123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- $PBExportHeader$uo_ddlb_wfjg_sptid.sru
- forward
- global type uo_ddlb_wfjg_sptid from dropdownlistbox
- end type
- end forward
- global type uo_ddlb_wfjg_sptid from dropdownlistbox
- integer width = 805
- integer height = 632
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean sorted = false
- boolean vscrollbar = true
- borderstyle borderstyle = stylelowered!
- end type
- global uo_ddlb_wfjg_sptid uo_ddlb_wfjg_sptid
- type variables
- long uo_sptid
- end variables
- event constructor;Long ls_sptid
- String ls_sptname
- Long cnt = 0
- long ll_i
- string ls_space
- int li_spacenum
- DECLARE find_wfjgspt CURSOR FOR
- SELECT DISTINCT DERIVEDTBL.sptid, u_spt.name
- FROM (SELECT DISTINCT sptid
- FROM ow_wfjgware
- UNION ALL
- SELECT DISTINCT sptid
- FROM ow_wfjgbalc) DERIVEDTBL INNER JOIN
- u_spt ON DERIVEDTBL.sptid = u_spt.sptid
- order by u_spt.name;
- open find_wfjgspt;
- fetch find_wfjgspt into :ls_sptid,:ls_sptname ;
- do while sqlca.sqlcode =0
-
- li_spacenum = 50 - len(trim(ls_sptname)) - 2 - len(string(ls_sptid))
- ls_space = fill(' ',li_spacenum)
-
- THIS.AddItem (ls_sptname+ls_space+'['+String(ls_sptid)+']')
-
- fetch find_wfjgspt into :ls_sptid,:ls_sptname ;
- loop
- close find_wfjgspt;
- THIS.uo_sptid = ls_sptid
- THIS.Text = ls_sptname+ls_space+'['+String(ls_sptid)+']'
- SELECT count(*)
- into :cnt
- FROM ow_wfjgbalc
- where ow_wfjgbalc.balcdateint = 0;
- IF cnt > 1 THEN
- THIS.AddItem ('[全部]')
- END IF
- end event
- event selectionchanged;IF THIS.Text = '[全部]' THEN
- uo_sptid = -1
- ELSE
- uo_sptid = Long(Mid ( THIS.Text,Pos(THIS.Text,'[') + 1,Len(THIS.Text) - Pos(THIS.Text,'[') - 1 ))
- END IF
- end event
- on uo_ddlb_wfjg_sptid.create
- end on
- on uo_ddlb_wfjg_sptid.destroy
- end on
|