$PBExportHeader$w_order_ml_pro_ch.srw forward global type w_order_ml_pro_ch from w_publ_base end type type dw_1 from u_dw_rbtnfilter within w_order_ml_pro_ch end type type cb_ch from uo_imflatbutton within w_order_ml_pro_ch end type type cbx_1 from checkbox within w_order_ml_pro_ch end type type cbx_all from checkbox within w_order_ml_pro_ch end type end forward global type w_order_ml_pro_ch from w_publ_base integer width = 2761 integer height = 2304 string title = "计划工序选择" boolean minbox = false windowtype windowtype = response! dw_1 dw_1 cb_ch cb_ch cbx_1 cbx_1 cbx_all cbx_all end type global w_order_ml_pro_ch w_order_ml_pro_ch type variables s_saletaskmx s_order_open s_order_ml_workprice_array s_select Boolean if_changeselect = TRUE Int if_mlselect = 0 end variables on w_order_ml_pro_ch.create int iCurrent call super::create this.dw_1=create dw_1 this.cb_ch=create cb_ch this.cbx_1=create cbx_1 this.cbx_all=create cbx_all iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.dw_1 this.Control[iCurrent+2]=this.cb_ch this.Control[iCurrent+3]=this.cbx_1 this.Control[iCurrent+4]=this.cbx_all end on on w_order_ml_pro_ch.destroy call super::destroy destroy(this.dw_1) destroy(this.cb_ch) destroy(this.cbx_1) destroy(this.cbx_all) end on event open;call super::open;s_order_open = Message.PowerObjectParm IF s_order_open.if_select_any = 0 THEN cbx_1.Enabled = FALSE if_mlselect = 0 cbx_1.Checked = FALSE cbx_all.Enabled = FALSE ELSE cbx_1.Enabled = TRUE END IF dw_1.SetTransObject(sqlca) dw_1.Retrieve(s_order_open.scid,s_order_open.taskid,s_order_open.printid) end event event close;call super::close;CloseWithReturn(THIS,s_select) end event type cb_func from w_publ_base`cb_func within w_order_ml_pro_ch boolean visible = false integer y = 1404 boolean enabled = false end type type cb_exit from w_publ_base`cb_exit within w_order_ml_pro_ch integer x = 1431 integer y = 2096 integer width = 302 string text = "取消" end type type dw_1 from u_dw_rbtnfilter within w_order_ml_pro_ch integer width = 2738 integer height = 2076 boolean bringtotop = true string title = "none" string dataobject = "dw_order_ml_pro_ch" boolean hscrollbar = true boolean vscrollbar = true end type event rowfocuschanged;call super::rowfocuschanged;if if_mlselect=1 then if currentrow <=0 then return if keydown(keycontrol!) then if this.isselected(currentrow) then this.selectrow(currentrow,false) if_changeselect=false else if_changeselect=true end if else if not this.isselected(currentrow) then this.selectrow(currentrow,true) if_changeselect=false else if_changeselect=true end if end if else if dw_edit_mode then return if currentrow <=0 then return this.selectrow(0,false) this.selectrow(currentrow,true) end if end event event doubleclicked;call super::doubleclicked;cb_ch.PostEvent(Clicked!) end event event clicked;call super::clicked;if row>0 then this.setrow(row) if if_mlselect=1 then if if_changeselect then this.selectrow(row,not this.IsSelected(row)) else if_changeselect=true end if else this.selectrow(0,false) this.selectrow(row,true) end if end if end event type cb_ch from uo_imflatbutton within w_order_ml_pro_ch integer x = 997 integer y = 2096 integer height = 96 integer taborder = 20 boolean bringtotop = true string text = "选择" string normalpicname = "ok.bmp" end type event clicked;call super::clicked;Long LS_ROW,ll_i,chc = 0 LS_ROW = dw_1.GetRow() IF LS_ROW <= 0 THEN MessageBox('系统提示','请先选择目标行!',StopSign!) RETURN END IF FOR ll_i = 1 TO dw_1.RowCount() IF dw_1.IsSelected(ll_i) THEN chc++ s_select.procode[chc] = dw_1.Object.u_orderrqwp_procode[ll_i] s_select.proname[chc] = dw_1.Object.u_orderrqwp_proname[ll_i] s_select.workprice[chc] = dw_1.Object.u_orderrqwp_workprice[ll_i] s_select.status[chc] = dw_1.Object.status[ll_i] s_select.proorder[chc] = dw_1.Object.u_orderrqwp_proorder[ll_i] s_select.proqty[chc] = dw_1.Object.u_orderrqwp_proqty[ll_i] END IF NEXT IF chc = 0 THEN MessageBox('系统提示','请至少选择一个目标行!',StopSign!) RETURN END IF Close(PARENT) end event type cbx_1 from checkbox within w_order_ml_pro_ch integer x = 27 integer y = 2092 integer width = 251 integer height = 92 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;if this.checked then if_mlselect=1 cbx_all.enabled = true else if_mlselect=0 cbx_all.enabled = false cbx_all.checked = false long li FOR li = 1 TO dw_1.RowCount() dw_1.SelectRow(li,FALSE) NEXT end if SetProfileString (sys_inifilename,dw_1.DataObject, "if_mlselect", String(if_mlselect)) end event event constructor;if_mlselect=integer(ProfileString (sys_inifilename,dw_1.DATAOBJECT, "if_mlselect", '0')) if if_mlselect =0 then this.checked=false else this.checked=true cbx_all.enabled = true end if end event type cbx_all from checkbox within w_order_ml_pro_ch integer x = 233 integer y = 2092 integer width = 251 integer height = 92 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 boolean enabled = false string text = "全选" end type event clicked;IF dw_1.RowCount() <= 0 THEN RETURN Long li IF THIS.Checked THEN FOR li = 1 TO dw_1.RowCount() dw_1.SelectRow(li,TRUE) NEXT ELSE FOR li = 1 TO dw_1.RowCount() dw_1.SelectRow(li,FALSE) NEXT END IF end event