• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 在PB中如何實現數據模糊查詢(四)

    發表于:2008-02-22來源:作者:點擊數: 標簽:
    5. StaticText: st_1屬性: X = 46 Y = 32 Width = 466 Height = 64 TabOrder = 0 Visible = true Text = "請輸入查詢條件: " TextColor = 0 BackColor = 80269524 Alignment = left! FillPattern = solid! 6. CommandButton: cb_exit屬性: X = 2578 Y = 376
    5. StaticText: st_1屬性:

        X = 46 Y = 32 Width = 466 Height = 64
        TabOrder = 0 Visible = true Text = "請輸入查詢條件: " TextColor = 0
        BackColor = 80269524 Alignment = left! FillPattern = solid!

        6. CommandButton: cb_exit屬性:

        X = 2578 Y = 376 Width = 256 Height = 108
        TabOrder = 30 Visible = true Enabled = true Text = "&F.返回"
        Cancel = true

        6.1 CommandButton: cb_exit的 clicked 事件:

        功能:直接退出。

        Close(parent)

        7. CommandButton: cb_exec屬性:

        X = 2578 Y = 204 Width = 256 Height = 108
        TabOrder = 20 Visible = true Enabled = true Text = "&Z.執行"
        Default = true

        7.1 CommandButton: cb_exec的 clicked 事件:

        功能:設置組和sql語法。

        注釋:(1).n_cst_sql、n_cst_sqlattrib為PFC中用戶對象,這里不再詳述。

        8. DataWindow: dw_column屬性:

        X = 2578 Y = 536 Width = 69 Height = 60
        TabOrder = 10 Visible = true Enabled = true DataObject = "d_column_set"
        Border = true LiveScroll = true BorderStyle = stylebox

        9. DataWindow: dw_where屬性:

        X = 46 Y = 120 Width = 2459 Height = 448
        TabOrder = 40 Visible = true Enabled = true DataObject = "d_where"
        VScrollBar = true Border = true BorderStyle = stylelowered!

        9.1 DataWindow: dw_where的 editchanged 事件:

        功能:設置"執行"按鈕是否有效。


        9.2 DataWindow: dw_where的itemchanged 事件:

        功能:見代碼中的注釋。

        string colname,colvalue, logvalue
        long currow
        ib_changed = true
        cb_exec.Enabled = True
        currow = GetRow()
        If MaxEditRow < Currow Then MaxEditRow = currow
        // MaxEditRow 為當前已編輯過的最大行的行號。實例變量。
        colname = GetColumnName()
        colvalue = GetItemString(currow,colname)
        Choose Case dwo.name
        Case 'dispvalue'
        Object.value[row] = data
        Case Else
        End Choose
        //設置當前行的operator的初始值為"="
        //設置上一行的logical的初始值為"and"
        if colname = "column1" then
        if colvalue = "" or isnull(colvalue) then
        SetItem(currow,"operator","=")
        if currow >= 2 then
        colvalue = GetItemString(currow - 1,colname)
        logvalue = GetItemString(currow - 1,"logical")
        if colvalue <> "" and (logvalue = "" or isnull(logvalue)) then
        SetItem(currow - 1,"logical","and")
        end if
        end if
        end if
        end if
        //檢查并設置左括號。
        long ll, i
        colvalue = GetText()
        if colname = "precol" then
        if colvalue <> "" and not isnull(colvalue) then
        ll = len(colvalue)
        colvalue = ""
        For i = 1 to ll
        colvalue += "("
        Next
        SetItem(currow,"precol",colvalue)
        this.Settext(colvalue)
        Return 2
        end if
        end if

        9.3 DataWindow: dw_where的losefocus 事件:

        Aclearcase/" target="_blank" >cceptText()

        9.4 DataWindow: dw_where的rbuttondown 事件:

        功能:設置彈出式菜單。

        注釋:

        (1) m_cpq_rbutton_paste菜單的屬性和代碼如下:

        1.MenuItem = m_1 "a1"
        Visible = true Enabled = true
        2.MenuItems for m_1
        MenuItem = m_value "&V.取現有值"
        Visible = true Enabled = true
        3.Script for: nt clicked event
        long ll_pos
        String sSyntax,ls_parm,ls_data,ls_disp
        datawindow dwp
        dwp = Message.PowerObjectParm
        sSyntax = Message.StringParm
        if sSyntax = "" or isNull(sSyntax) then
        beep(3)
        return
        end if
        OpenWithParm(w_paste,sSyntax) //w_paste為響應式窗口
        ls_parm = Message.StringParm
        if ls_parm <> "cancel" then
        ll_pos = Pos ( ls_parm,'/')
        If ll_pos = 0 Then
        ls_data = ls_parm
        ls_disp = ls_parm
        Else
        ls_data = Left ( ls_parm , ll_pos - 1 )
        ls_disp = Mid ( ls_parm , ll_pos + 1 )
        End If
        dwp.SetItem(dwp.GetRow(),"value",ls_data)
        dwp.SetItem(dwp.GetRow(),"dispvalue",ls_disp)
        dwp.AcceptText()
        end if
        4. MenuItem = m_clear "&D.清除本列"
        Visible = true Enabled = true
        5. Script for: clicked event
        datawindow dwp
        dwp = Message.PowerObjectParm
        dwp.DeleteRow(0)
        dwp.InsertRow(0)
        End of Script
        MenuItem = m_return "&N.返回"
        Visible = true Enabled = true

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>