123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- $PBExportHeader$w_pz_ch.srw
- forward
- global type w_pz_ch from window
- end type
- type st_1 from statictext within w_pz_ch
- end type
- type sle_usual_query from singlelineedit within w_pz_ch
- end type
- type cb_1 from uo_imflatbutton within w_pz_ch
- end type
- type r_bar from rectangle within w_pz_ch
- end type
- type dw_ch from datawindow within w_pz_ch
- end type
- end forward
- global type w_pz_ch from window
- integer width = 1143
- integer height = 1208
- boolean titlebar = true
- boolean controlmenu = true
- windowtype windowtype = response!
- long backcolor = 134217739
- string icon = "AppIcon!"
- event ue_usual_query_filt ( )
- st_1 st_1
- sle_usual_query sle_usual_query
- cb_1 cb_1
- r_bar r_bar
- dw_ch dw_ch
- end type
- global w_pz_ch w_pz_ch
- type variables
- String rst_str
- end variables
- event ue_usual_query_filt();String obj_expr = ''
- string ls_name
- CHOOSE CASE dw_ch.dataobject
- CASE 'dw_pz_ch_color'
- ls_name = 'colorname'
- CASE 'dw_pz_ch_woodcode'
- ls_name = 'woodcode'
- CASE 'dw_pz_ch_pcode'
- ls_name = 'pcode'
- CASE 'dw_pz_ch_pztype'
- ls_name = 'dscrp'
- CASE 'dddw_configure_pzmx'
- ls_name = 'namemx'
- CASE ELSE
- return
- END CHOOSE
- IF Trim(sle_usual_query.Text) <> '' THEN
- IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
- obj_expr = obj_expr+' ('+ls_name+' LIKE "%'+Trim(sle_usual_query.Text)+'%")'
- ELSE
- obj_expr = obj_expr+' ('+ls_name+' LIKE "'+Trim(sle_usual_query.Text)+'")'
- END IF
- END IF
- dw_ch.SetFilter(obj_expr)
- dw_ch.SetRedraw(FALSE)
- dw_ch.Filter()
- IF dw_ch.RowCount() >= 1 THEN
- dw_ch.SelectRow(0,FALSE)
- dw_ch.SelectRow(1,TRUE)
- END IF
- dw_ch.SetRedraw(TRUE)
- end event
- on w_pz_ch.create
- this.st_1=create st_1
- this.sle_usual_query=create sle_usual_query
- this.cb_1=create cb_1
- this.r_bar=create r_bar
- this.dw_ch=create dw_ch
- this.Control[]={this.st_1,&
- this.sle_usual_query,&
- this.cb_1,&
- this.r_bar,&
- this.dw_ch}
- end on
- on w_pz_ch.destroy
- destroy(this.st_1)
- destroy(this.sle_usual_query)
- destroy(this.cb_1)
- destroy(this.r_bar)
- destroy(this.dw_ch)
- end on
- event open;s_pzwin_open s_win
- s_win = Message.PowerObjectParm
- environment exerun_env
- GetEnvironment(exerun_env )
- THIS.X = s_win.arg_x
- THIS.Y = s_win.arg_y
- //计算窗口位置
- if THIS.X + this.width > PixelsToUnits(exerun_env.screenwidth, XPixelsToUnits!) then
- THIS.X = PixelsToUnits(exerun_env.screenwidth, XPixelsToUnits!) - this.width
- end if
- if THIS.Y + this.height > PixelsToUnits(exerun_env.screenheight, XPixelsToUnits!) - 350 then
- THIS.Y = PixelsToUnits(exerun_env.screenheight, XPixelsToUnits!) - this.height - 350
- end if
- dw_ch.DataObject = s_win.arg_dwname
- dw_ch.SetTransObject(sqlca)
- CHOOSE CASE s_win.arg_dwname
- CASE 'dw_pz_ch_color'
- THIS.Title = sys_option_change_status + ' 选择'
- CASE 'dw_pz_ch_woodcode'
- THIS.Title = sys_option_change_woodcode + ' 选择'
- CASE 'dw_pz_ch_pcode'
- THIS.Title = sys_option_change_pcode + ' 选择'
- CASE 'dw_pz_ch_pztype'
- THIS.Title = '配置选择'
- CASE 'dddw_configure_pzmx'
- THIS.Title = '部件明细配置选择'
- CASE ELSE
- THIS.Title = '配置选择'
- END CHOOSE
- //IF s_win.arg_mtrlid = 0 THEN
- // dw_ch.Retrieve()
- //ELSE
- dw_ch.Retrieve(s_win.arg_mtrlid)
- //END IF
- end event
- event close;CloseWithReturn(THIS,rst_str)
- end event
- event resize;r_bar.width = this.width
- end event
- type st_1 from statictext within w_pz_ch
- integer x = 9
- integer y = 24
- integer width = 210
- integer height = 56
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "内容含:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type sle_usual_query from singlelineedit within w_pz_ch
- event keyup pbm_keyup
- integer x = 224
- integer y = 12
- integer width = 507
- integer height = 84
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- end type
- event keyup;PARENT.TRIGGEREVENT("ue_usual_query_filt")
- end event
- type cb_1 from uo_imflatbutton within w_pz_ch
- integer y = 120
- integer width = 110
- integer height = 96
- integer taborder = 10
- string text = ""
- boolean cancel = true
- string normalpicname = "exit.bmp"
- integer picsize = 16
- boolean border = false
- end type
- event clicked;call super::clicked;rst_str = ''
- Close(PARENT)
- end event
- type r_bar from rectangle within w_pz_ch
- boolean visible = false
- long linecolor = 16777215
- integer linethickness = 4
- long fillcolor = 1073741824
- integer x = 402
- integer width = 146
- integer height = 104
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = dw_ch.y - 5
- end event
- type dw_ch from datawindow within w_pz_ch
- event ue_mousemove pbm_dwnmousemove
- integer y = 104
- integer width = 1120
- integer height = 1016
- integer taborder = 10
- boolean bringtotop = true
- string title = "none"
- string dataobject = "dw_pz_ch_color"
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event ue_mousemove;IF row > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(row,TRUE)
- END IF
- end event
- event clicked;IF row > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(row,TRUE)
-
- String ls_column1_name
- ls_column1_name = THIS.Describe("#1.name")
- rst_str = THIS.GetItemString(row,ls_column1_name)
- END IF
- Close(PARENT)
- end event
- event constructor;f_title_change(this)
- end event
|