$PBExportHeader$w_workprice_audit.srw forward global type w_workprice_audit from window end type type ddlb_wrkgrp from dropdownlistbox within w_workprice_audit end type type st_3 from statictext within w_workprice_audit end type type cb_cancel from uo_imflatbutton within w_workprice_audit end type type cb_ok from uo_imflatbutton within w_workprice_audit end type end forward global type w_workprice_audit from window integer width = 1157 integer height = 448 boolean titlebar = true string title = "工价表审核/撤审" boolean controlmenu = true windowtype windowtype = response! long backcolor = 134217739 string icon = "AppIcon!" boolean center = true ddlb_wrkgrp ddlb_wrkgrp st_3 st_3 cb_cancel cb_cancel cb_ok cb_ok end type global w_workprice_audit w_workprice_audit type variables long rslt_wrkGrpid end variables on w_workprice_audit.create this.ddlb_wrkgrp=create ddlb_wrkgrp this.st_3=create st_3 this.cb_cancel=create cb_cancel this.cb_ok=create cb_ok this.Control[]={this.ddlb_wrkgrp,& this.st_3,& this.cb_cancel,& this.cb_ok} end on on w_workprice_audit.destroy destroy(this.ddlb_wrkgrp) destroy(this.st_3) destroy(this.cb_cancel) destroy(this.cb_ok) end on event close;closewithreturn(this,rslt_wrkGrpid) end event event open;Long ll_mtrlid ll_mtrlid = Message.DoubleParm String ls_wrkGrpName Long ls_wrkGrpid DECLARE cur_workgroup CURSOR FOR SELECT distinct u_sc_workgroup.wrkGrpid, u_sc_workgroup.wrkGrpName FROM u_sc_workgroup,u_sc_workprice WHERE ( u_sc_workgroup.wrkGrpid = u_sc_workprice.wrkGrpid ) AND ( u_sc_workprice.mtrlid = :ll_mtrlid ) Order By u_sc_workgroup.wrkGrpid Desc; OPEN cur_workgroup; FETCH cur_workgroup INTO :ls_wrkGrpid,:ls_wrkGrpName; DO WHILE sqlca.SQLCode = 0 ddlb_wrkgrp.AddItem('['+String(ls_wrkGrpid)+']'+ls_wrkGrpName) FETCH cur_workgroup INTO :ls_wrkGrpid,:ls_wrkGrpName; LOOP ddlb_wrkgrp.AddItem('[-1]全部') ddlb_wrkgrp.Text = '[-1]全部' CLOSE cur_workgroup; end event type ddlb_wrkgrp from dropdownlistbox within w_workprice_audit integer x = 265 integer y = 64 integer width = 640 integer height = 684 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 type st_3 from statictext within w_workprice_audit integer x = 78 integer y = 76 integer width = 160 integer height = 48 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 cb_cancel from uo_imflatbutton within w_workprice_audit integer x = 635 integer y = 204 integer width = 265 integer taborder = 40 string text = "取消" boolean cancel = true end type event clicked;call super::clicked;rslt_wrkGrpid = 0 CLOSE(PARENT) end event type cb_ok from uo_imflatbutton within w_workprice_audit integer x = 251 integer y = 204 integer width = 265 integer taborder = 30 end type event clicked;call super::clicked; rslt_wrkGrpid=long(mid(ddlb_wrkgrp.text,2,pos(ddlb_wrkgrp.text,']') - 2 )) close(parent) end event