123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- $PBExportHeader$w_unit_ch.srw
- forward
- global type w_unit_ch from w_publ_choice
- end type
- type rb_1 from radiobutton within w_unit_ch
- end type
- type rb_2 from radiobutton within w_unit_ch
- end type
- end forward
- global type w_unit_ch from w_publ_choice
- integer width = 1477
- integer height = 1572
- string title = "单位选择"
- rb_1 rb_1
- rb_2 rb_2
- end type
- global w_unit_ch w_unit_ch
- type variables
- s_unit INS_RT_STRU
- long ins_mtrlid
- end variables
- on w_unit_ch.create
- int iCurrent
- call super::create
- this.rb_1=create rb_1
- this.rb_2=create rb_2
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.rb_1
- this.Control[iCurrent+2]=this.rb_2
- end on
- on w_unit_ch.destroy
- call super::destroy
- destroy(this.rb_1)
- destroy(this.rb_2)
- end on
- event dw_filter;call super::dw_filter;string obj_expr=''
- if trim(sle_ch.text)<>'' then
- IF POS(trim(sle_ch.text),'%')=0 THEN
- obj_expr=obj_expr+'( unit LIKE "%'+trim(sle_ch.text)+'%" )'
- ELSE
- obj_expr=obj_expr+'( unit LIKE "'+trim(sle_ch.text)+'" )'
- END IF
- end if
- if trim(sle_ch.text)<>'' then
- if obj_expr<>'' then obj_expr=obj_expr+ ' and '
- IF POS(trim(sle_ch.text),'%')=0 THEN
- obj_expr=obj_expr+' ( unit LIKE "%'+trim(sle_ch.text)+'%" )'
- ELSE
- obj_expr=obj_expr+'( unit LIKE "'+trim(sle_ch.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
- event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
- end event
- event open;THIS.TriggerEvent('ue_before_open')
- wf_movetocenter()
- ins_mtrlid = Message.DoubleParm
- if_ue_sort = TRUE
- dw_CH.SetTransObject (sqlca)
- cb_retrieve.TriggerEvent(Clicked!)
- Int il_returntype
- il_returntype = Integer(f_ProfileString (sys_empid,'w_unit_ch', "returntype", '0'))
- IF il_returntype = 0 THEN
- rb_1.Checked = TRUE
- rb_2.Checked = FALSE
- ELSE
- rb_1.Checked = FALSE
- rb_2.Checked = TRUE
- END IF
- end event
- type cb_func from w_publ_choice`cb_func within w_unit_ch
- end type
- type cb_exit from w_publ_choice`cb_exit within w_unit_ch
- end type
- type sle_ch from w_publ_choice`sle_ch within w_unit_ch
- boolean visible = false
- integer x = 375
- end type
- type dw_ch from w_publ_choice`dw_ch within w_unit_ch
- integer y = 360
- integer width = 1435
- integer height = 1108
- string dataobject = "dw_unit_ch"
- end type
- type st_1 from w_publ_choice`st_1 within w_unit_ch
- boolean visible = false
- integer width = 343
- string text = "单位名称含:"
- boolean righttoleft = false
- end type
- type cb_retrieve from w_publ_choice`cb_retrieve within w_unit_ch
- end type
- event cb_retrieve::clicked;//
- dw_ch.retrieve(ins_mtrlid)
- end event
- type cb_choice from w_publ_choice`cb_choice within w_unit_ch
- end type
- event cb_choice::clicked;call super::clicked;Long LS_ROW
- LS_ROW = dw_CH.GetRow()
- IF LS_ROW <= 0 THEN
- MessageBox('提示','请先选择目标行!', Information!, OK! )
- RETURN
- END IF
- INS_RT_STRU.unit = dw_CH.Object.unit[LS_ROW]
- INS_RT_STRU.rate = dw_CH.Object.rate[LS_ROW]
- IF rb_1.Checked THEN
- INS_RT_STRU.ReturnType = 0
- ELSE
- INS_RT_STRU.ReturnType = 1
- END IF
- Close(PARENT)
- end event
- type ln_bar from w_publ_choice`ln_bar within w_unit_ch
- end type
- type ln_bar2 from w_publ_choice`ln_bar2 within w_unit_ch
- end type
- type r_bar from w_publ_choice`r_bar within w_unit_ch
- end type
- type ln_1 from w_publ_choice`ln_1 within w_unit_ch
- boolean visible = false
- end type
- type ln_2 from w_publ_choice`ln_2 within w_unit_ch
- boolean visible = false
- end type
- type rb_1 from radiobutton within w_unit_ch
- integer x = 37
- integer y = 188
- integer width = 905
- integer height = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "按辅助单位数量计算库存单位数量"
- boolean checked = true
- end type
- event clicked;int il_returntype
- if this.checked then
- il_returntype = 0
- else
- il_returntype = 1
- end if
- f_SetProfileString (sys_empid,'w_unit_ch', "returntype", string(il_returntype))
- end event
- type rb_2 from radiobutton within w_unit_ch
- integer x = 37
- integer y = 268
- integer width = 905
- integer height = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "按库存单位数量计算辅助单位数量"
- end type
- event clicked;int il_returntype
- if this.checked then
- il_returntype = 1
- else
- il_returntype = 0
- end if
- f_SetProfileString (sys_empid,'w_unit_ch', "returntype", string(il_returntype))
- end event
|