123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320 |
- $PBExportHeader$w_changerate_ch.srw
- forward
- global type w_changerate_ch from w_publ_base
- end type
- type cb_1 from uo_imflatbutton within w_changerate_ch
- end type
- type cb_2 from uo_imflatbutton within w_changerate_ch
- end type
- type sle_1 from singlelineedit within w_changerate_ch
- end type
- type st_1 from statictext within w_changerate_ch
- end type
- type st_2 from statictext within w_changerate_ch
- end type
- type rb_1 from radiobutton within w_changerate_ch
- end type
- type rb_2 from radiobutton within w_changerate_ch
- end type
- type rb_3 from radiobutton within w_changerate_ch
- end type
- type st_3 from statictext within w_changerate_ch
- end type
- type cbx_1 from checkbox within w_changerate_ch
- end type
- end forward
- global type w_changerate_ch from w_publ_base
- integer width = 1175
- integer height = 644
- string title = "设定转换比率"
- boolean minbox = false
- windowtype windowtype = response!
- cb_1 cb_1
- cb_2 cb_2
- sle_1 sle_1
- st_1 st_1
- st_2 st_2
- rb_1 rb_1
- rb_2 rb_2
- rb_3 rb_3
- st_3 st_3
- cbx_1 cbx_1
- end type
- global w_changerate_ch w_changerate_ch
- type variables
- string ls_rate
- long ll_cmp1,ll_cmp2
- s_changerate s_rate
- end variables
- on w_changerate_ch.create
- int iCurrent
- call super::create
- this.cb_1=create cb_1
- this.cb_2=create cb_2
- this.sle_1=create sle_1
- this.st_1=create st_1
- this.st_2=create st_2
- this.rb_1=create rb_1
- this.rb_2=create rb_2
- this.rb_3=create rb_3
- this.st_3=create st_3
- this.cbx_1=create cbx_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cb_1
- this.Control[iCurrent+2]=this.cb_2
- this.Control[iCurrent+3]=this.sle_1
- this.Control[iCurrent+4]=this.st_1
- this.Control[iCurrent+5]=this.st_2
- this.Control[iCurrent+6]=this.rb_1
- this.Control[iCurrent+7]=this.rb_2
- this.Control[iCurrent+8]=this.rb_3
- this.Control[iCurrent+9]=this.st_3
- this.Control[iCurrent+10]=this.cbx_1
- end on
- on w_changerate_ch.destroy
- call super::destroy
- destroy(this.cb_1)
- destroy(this.cb_2)
- destroy(this.sle_1)
- destroy(this.st_1)
- destroy(this.st_2)
- destroy(this.rb_1)
- destroy(this.rb_2)
- destroy(this.rb_3)
- destroy(this.st_3)
- destroy(this.cbx_1)
- end on
- event close;call super::close;closewithreturn(this,s_rate)
- end event
- event open;call super::open;long ll_pzflag,ll_addqty
- //string ls_rate
- ls_rate = f_ProfileString (sys_empid,'w_changedrate_ch', "changedrate",'0')
- if ls_rate = '0' then
- ls_rate = '100'
- end if
- ll_addqty = long(f_ProfileString (sys_empid,'w_changedrate_ch', "addqty",'0'))
- if ll_addqty = 1 then
- cbx_1.checked = true
- end if
- ll_pzflag = long(f_ProfileString (sys_empid,'w_changedrate_ch', "pzflag",'0'))
- if ll_pzflag = 3 then
- rb_3.checked = true
- elseif ll_pzflag = 2 then
- rb_2.checked = true
- else
- rb_1.checked = true
- end if
-
- sle_1.text = ls_rate //string(ll_rate,'#,##0.#####')
- end event
- type cb_func from w_publ_base`cb_func within w_changerate_ch
- boolean visible = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_changerate_ch
- integer x = 795
- integer y = 436
- integer width = 302
- integer height = 100
- end type
- type cb_1 from uo_imflatbutton within w_changerate_ch
- integer x = 55
- integer y = 436
- integer taborder = 20
- boolean bringtotop = true
- end type
- event clicked;call super::clicked;ls_rate = sle_1.text
- if rb_1.checked then
- ll_cmp1 = 1
- elseif rb_2.checked then
- ll_cmp1 = 2
- else
- ll_cmp1 = 3
- end if
- if cbx_1.checked then
- ll_cmp2 = 1
- else
- ll_cmp2 = 0
- end if
- s_rate.rate = ls_rate
- s_rate.cmp1 = ll_cmp1
- s_rate.cmp2 = ll_cmp2
- close(parent)
- end event
- type cb_2 from uo_imflatbutton within w_changerate_ch
- integer x = 430
- integer y = 436
- integer taborder = 20
- boolean bringtotop = true
- string text = "修改默认"
- end type
- event clicked;call super::clicked;f_SetProfileString (sys_empid,'w_changedrate_ch', "changedrate",sle_1.text)
- if cbx_1.checked then
- f_SetProfileString (sys_empid,'w_changedrate_ch', "addqty",'1')
- else
- f_SetProfileString (sys_empid,'w_changedrate_ch', "addqty",'0')
- end if
- if rb_1.checked then
- f_SetProfileString (sys_empid,'w_changedrate_ch', "pzflag",'1')
- elseif rb_2.checked then
- f_SetProfileString (sys_empid,'w_changedrate_ch', "pzflag",'2')
- else
- f_SetProfileString (sys_empid,'w_changedrate_ch', "pzflag",'3')
- end if
- messagebox('提示','修改成功', Information!, OK! )
- end event
- type sle_1 from singlelineedit within w_changerate_ch
- integer x = 402
- integer y = 36
- integer width = 402
- integer height = 84
- integer taborder = 30
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- end type
- type st_1 from statictext within w_changerate_ch
- integer x = 119
- integer y = 52
- integer width = 233
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217738
- string text = "默认比率"
- boolean focusrectangle = false
- end type
- type st_2 from statictext within w_changerate_ch
- integer x = 110
- integer y = 240
- integer width = 242
- integer height = 52
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217738
- string text = "计算公式"
- boolean focusrectangle = false
- end type
- type rb_1 from radiobutton within w_changerate_ch
- integer x = 389
- integer y = 160
- integer width = 270
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217738
- string text = "属性"
- end type
- type rb_2 from radiobutton within w_changerate_ch
- integer x = 389
- integer y = 240
- integer width = 270
- integer height = 56
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217738
- string text = "属性1"
- end type
- type rb_3 from radiobutton within w_changerate_ch
- integer x = 389
- integer y = 312
- integer width = 270
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217738
- string text = "属性2"
- end type
- type st_3 from statictext within w_changerate_ch
- integer x = 690
- integer y = 232
- integer width = 69
- integer height = 96
- boolean bringtotop = true
- integer textsize = -16
- integer weight = 700
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217738
- string text = "+"
- alignment alignment = center!
- boolean focusrectangle = false
- end type
- type cbx_1 from checkbox within w_changerate_ch
- integer x = 823
- integer y = 244
- integer width = 219
- integer height = 64
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217738
- string text = "辅数"
- end type
|