$PBExportHeader$w_order_ml_mrp_ch.srw forward global type w_order_ml_mrp_ch from window end type type cbx_ifwx_mtrl_not_useqty from checkbox within w_order_ml_mrp_ch end type type cbx_ifbuy_mtrl_not_useqty from checkbox within w_order_ml_mrp_ch end type type cbx_if_allowuse from checkbox within w_order_ml_mrp_ch end type type rb_2 from radiobutton within w_order_ml_mrp_ch end type type rb_1 from radiobutton within w_order_ml_mrp_ch end type type cb_2 from uo_imflatbutton within w_order_ml_mrp_ch end type type cb_1 from uo_imflatbutton within w_order_ml_mrp_ch end type end forward global type w_order_ml_mrp_ch from window integer width = 1531 integer height = 884 boolean titlebar = true string title = "生产计划MRP运算" boolean controlmenu = true windowtype windowtype = response! long backcolor = 134217739 string icon = "AppIcon!" boolean center = true cbx_ifwx_mtrl_not_useqty cbx_ifwx_mtrl_not_useqty cbx_ifbuy_mtrl_not_useqty cbx_ifbuy_mtrl_not_useqty cbx_if_allowuse cbx_if_allowuse rb_2 rb_2 rb_1 rb_1 cb_2 cb_2 cb_1 cb_1 end type global w_order_ml_mrp_ch w_order_ml_mrp_ch type variables s_order_ml_mrp s_mrp end variables on w_order_ml_mrp_ch.create this.cbx_ifwx_mtrl_not_useqty=create cbx_ifwx_mtrl_not_useqty this.cbx_ifbuy_mtrl_not_useqty=create cbx_ifbuy_mtrl_not_useqty this.cbx_if_allowuse=create cbx_if_allowuse this.rb_2=create rb_2 this.rb_1=create rb_1 this.cb_2=create cb_2 this.cb_1=create cb_1 this.Control[]={this.cbx_ifwx_mtrl_not_useqty,& this.cbx_ifbuy_mtrl_not_useqty,& this.cbx_if_allowuse,& this.rb_2,& this.rb_1,& this.cb_2,& this.cb_1} end on on w_order_ml_mrp_ch.destroy destroy(this.cbx_ifwx_mtrl_not_useqty) destroy(this.cbx_ifbuy_mtrl_not_useqty) destroy(this.cbx_if_allowuse) destroy(this.rb_2) destroy(this.rb_1) destroy(this.cb_2) destroy(this.cb_1) end on event open;Int li_if_allowuse,li_mrp_ch li_if_allowuse = Long(ProfileString(SYS_INIFILENAME, "w_order_mrp_ch", "if_allowuse", "0")) li_mrp_ch = Long(ProfileString(SYS_INIFILENAME, "w_order_mrp_ch", "mrp_ch", "1")) IF li_if_allowuse = 1 THEN cbx_if_allowuse.Checked = TRUE ELSE cbx_if_allowuse.Checked = FALSE END IF cbx_if_allowuse.TriggerEvent(Clicked!) IF li_mrp_ch = 1 THEN rb_1.Checked = TRUE rb_2.Checked = FALSE ELSE rb_1.Checked = FALSE rb_2.Checked = TRUE END IF end event event close;Int li_if_allowuse,li_mrp_ch IF cbx_if_allowuse.Checked THEN li_if_allowuse = 1 ELSE li_if_allowuse = 0 END IF IF rb_1.Checked THEN li_mrp_ch = 1 ELSE li_mrp_ch = 2 END IF SetProfileString(SYS_INIFILENAME, "w_order_mrp_ch", "if_allowuse", String(li_if_allowuse)) SetProfileString(SYS_INIFILENAME, "w_order_mrp_ch", "mrp_ch", String(li_mrp_ch)) CloseWithReturn(THIS,s_mrp) end event type cbx_ifwx_mtrl_not_useqty from checkbox within w_order_ml_mrp_ch integer x = 261 integer y = 416 integer width = 905 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 16711680 long backcolor = 134217739 string text = "外协不考虑可用数" end type type cbx_ifbuy_mtrl_not_useqty from checkbox within w_order_ml_mrp_ch integer x = 261 integer y = 324 integer width = 576 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 16711680 long backcolor = 134217739 string text = "采购不考虑可用数" end type type cbx_if_allowuse from checkbox within w_order_ml_mrp_ch integer x = 178 integer y = 216 integer width = 466 integer height = 60 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 cbx_ifbuy_mtrl_not_useqty.Enabled = TRUE cbx_ifwx_mtrl_not_useqty.Enabled = TRUE ELSE cbx_ifbuy_mtrl_not_useqty.Enabled = FALSE cbx_ifwx_mtrl_not_useqty.Enabled = FALSE cbx_ifbuy_mtrl_not_useqty.Checked = FALSE cbx_ifwx_mtrl_not_useqty.Checked = FALSE END IF end event type rb_2 from radiobutton within w_order_ml_mrp_ch integer x = 699 integer y = 84 integer width = 402 integer height = 60 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "直接运算" end type type rb_1 from radiobutton within w_order_ml_mrp_ch integer x = 178 integer y = 84 integer width = 402 integer height = 60 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 type cb_2 from uo_imflatbutton within w_order_ml_mrp_ch integer x = 873 integer y = 616 integer width = 311 integer taborder = 20 string text = "取消" string normalpicname = "exit.bmp" end type event clicked;call super::clicked;s_mrp.mrptype = 0 Close(PARENT) end event type cb_1 from uo_imflatbutton within w_order_ml_mrp_ch integer x = 402 integer y = 616 integer width = 311 integer taborder = 10 string normalpicname = "ok.bmp" end type event clicked;call super::clicked;IF rb_1.Checked THEN s_mrp.mrptype = 1 ELSE s_mrp.mrptype = 2 END IF IF cbx_if_allowuse.Checked THEN s_mrp.if_allowuse = 1 ELSE s_mrp.if_allowuse = 0 END IF s_mrp.ifbuy_mtrl_not_useqty = cbx_ifbuy_mtrl_not_useqty.Checked s_mrp.ifwx_mtrl_not_useqty = cbx_ifwx_mtrl_not_useqty.Checked Close(PARENT) end event