$PBExportHeader$w_mtrldef_edit_limitprice.srw forward global type w_mtrldef_edit_limitprice from w_publ_easyq end type type cb_save from uo_imflatbutton within w_mtrldef_edit_limitprice end type type cbx_1 from checkbox within w_mtrldef_edit_limitprice end type type cb_pcl from uo_imflatbutton within w_mtrldef_edit_limitprice end type type cb_mod from uo_imflatbutton within w_mtrldef_edit_limitprice end type type tv_1 from uo_tv_mtrltype within w_mtrldef_edit_limitprice end type end forward global type w_mtrldef_edit_limitprice from w_publ_easyq string title = "物料收货限价批设定" cb_save cb_save cbx_1 cbx_1 cb_pcl cb_pcl cb_mod cb_mod tv_1 tv_1 end type global w_mtrldef_edit_limitprice w_mtrldef_edit_limitprice type variables string ls_handtype='' string ls_mtrltype = '' integer li_isuse=1 long cur_mtrlorigin=-1 end variables forward prototypes public subroutine wf_face () end prototypes public subroutine wf_face ();if dw_edit_mode then cb_save.enabled = true cb_pcl.enabled = true dw_1.settaborder('iflimitprice',10) cb_mod.text = "放弃" cb_mod.normalpicname = "Undo.bmp" else cb_save.enabled = false cb_pcl.enabled = false dw_1.settaborder('iflimitprice',0) cb_mod.text = "修改" cb_mod.normalpicname = "OPEN.bmp" end if cb_mod.triggerevent('ue_textchange') end subroutine on w_mtrldef_edit_limitprice.create int iCurrent call super::create this.cb_save=create cb_save this.cbx_1=create cbx_1 this.cb_pcl=create cb_pcl this.cb_mod=create cb_mod this.tv_1=create tv_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_save this.Control[iCurrent+2]=this.cbx_1 this.Control[iCurrent+3]=this.cb_pcl this.Control[iCurrent+4]=this.cb_mod this.Control[iCurrent+5]=this.tv_1 end on on w_mtrldef_edit_limitprice.destroy call super::destroy destroy(this.cb_save) destroy(this.cbx_1) destroy(this.cb_pcl) destroy(this.cb_mod) destroy(this.tv_1) end on event resize;call super::resize;tv_1.height = dw_1.height end event event open;call super::open;if_ue_retr=true if_ue_filter=true if_ue_sort=true if_ue_sentdataout=true tv_1.f_maketree(-1) cb_1.triggerevent(clicked!) wf_face() end event type cb_func from w_publ_easyq`cb_func within w_mtrldef_edit_limitprice end type type cb_exit from w_publ_easyq`cb_exit within w_mtrldef_edit_limitprice integer x = 1353 end type type cb_2 from w_publ_easyq`cb_2 within w_mtrldef_edit_limitprice integer x = 1051 integer taborder = 100 boolean bringtotop = true end type type cb_psetup from w_publ_easyq`cb_psetup within w_mtrldef_edit_limitprice integer x = 795 boolean bringtotop = true end type type cb_1 from w_publ_easyq`cb_1 within w_mtrldef_edit_limitprice boolean bringtotop = true end type event cb_1::clicked;call super::clicked; dw_1.Retrieve(cur_mtrlorigin,li_isuse,ls_handtype) RETURN end event type st_3 from w_publ_easyq`st_3 within w_mtrldef_edit_limitprice boolean visible = false integer x = 823 integer y = 368 end type type st_4 from w_publ_easyq`st_4 within w_mtrldef_edit_limitprice boolean visible = false integer x = 1170 integer y = 508 end type type em_1 from w_publ_easyq`em_1 within w_mtrldef_edit_limitprice boolean visible = false integer x = 736 integer y = 436 integer taborder = 110 end type type em_2 from w_publ_easyq`em_2 within w_mtrldef_edit_limitprice boolean visible = false integer x = 1253 integer y = 428 integer taborder = 140 end type type ddlb_yl from w_publ_easyq`ddlb_yl within w_mtrldef_edit_limitprice integer x = 1893 end type type cbx_yl from w_publ_easyq`cbx_yl within w_mtrldef_edit_limitprice integer x = 1682 end type type dw_1 from w_publ_easyq`dw_1 within w_mtrldef_edit_limitprice integer x = 805 integer y = 308 integer width = 2469 integer height = 1932 string dataobject = "dw_mtrldef_edit_limitprice" end type event dw_1::rowfocuschanged;IF currentrow <=0 THEN RETURN this.selectrow(0,false) this.selectrow(currentrow,true) end event event dw_1::clicked;call super::clicked;IF row <=0 THEN RETURN this.selectrow(0,false) this.selectrow(row,true) end event type sle_mtrl from w_publ_easyq`sle_mtrl within w_mtrldef_edit_limitprice end type type sle_cust from w_publ_easyq`sle_cust within w_mtrldef_edit_limitprice end type type st_mtrl from w_publ_easyq`st_mtrl within w_mtrldef_edit_limitprice end type type st_cust from w_publ_easyq`st_cust within w_mtrldef_edit_limitprice end type type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_mtrldef_edit_limitprice end type type pb_em1 from w_publ_easyq`pb_em1 within w_mtrldef_edit_limitprice boolean visible = false end type type pb_em2 from w_publ_easyq`pb_em2 within w_mtrldef_edit_limitprice boolean visible = false end type type pb_2 from w_publ_easyq`pb_2 within w_mtrldef_edit_limitprice boolean visible = false end type type cb_help from w_publ_easyq`cb_help within w_mtrldef_edit_limitprice integer x = 1202 end type type cb_copyself from w_publ_easyq`cb_copyself within w_mtrldef_edit_limitprice end type type gb_1 from w_publ_easyq`gb_1 within w_mtrldef_edit_limitprice end type type ln_bar from w_publ_easyq`ln_bar within w_mtrldef_edit_limitprice end type type ln_bar2 from w_publ_easyq`ln_bar2 within w_mtrldef_edit_limitprice end type type r_bar from w_publ_easyq`r_bar within w_mtrldef_edit_limitprice end type type ln_1 from w_publ_easyq`ln_1 within w_mtrldef_edit_limitprice end type type ln_2 from w_publ_easyq`ln_2 within w_mtrldef_edit_limitprice end type type ln_3 from w_publ_easyq`ln_3 within w_mtrldef_edit_limitprice integer beginy = 292 integer endy = 292 end type type ln_4 from w_publ_easyq`ln_4 within w_mtrldef_edit_limitprice end type type cb_save from uo_imflatbutton within w_mtrldef_edit_limitprice integer x = 302 integer width = 151 integer height = 164 integer taborder = 20 boolean bringtotop = true string text = "保存" string normalpicname = "save.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;if not f_power_ind(842) then messagebox('提示',"你没有使用权限!", Information!, OK! ) return end if dw_1.accepttext( ) IF dw_edit_mode THEN IF dw_1.UPDATE() <> 1 THEN ROLLBACK USING sqlca; MessageBox("提示","保存失败", Information!, OK! ) RETURN ELSE COMMIT USING sqlca; MessageBox('提示',"保存成功", Information!, OK! ) END IF END IF dw_edit_mode = not dw_edit_mode wf_face() cb_1.triggerevent(clicked!) end event type cbx_1 from checkbox within w_mtrldef_edit_limitprice integer x = 9 integer y = 212 integer width = 384 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 = 134217739 string text = "只显示有效" boolean checked = true end type event clicked;IF cbx_1.Checked THEN li_isuse = 1 ELSE li_isuse = -1 END IF cb_1.triggerevent(clicked!) end event type cb_pcl from uo_imflatbutton within w_mtrldef_edit_limitprice integer x = 603 integer width = 192 integer height = 164 integer taborder = 30 boolean bringtotop = true string text = "批处理" string normalpicname = "update.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;Long i,ll_limitprice Long uc_row uc_row = dw_1.GetRow() IF uc_row <= 0 THEN RETURN IF MessageBox('提示','确定要批修改物料收货限价吗?',question!,yesno!,2) = 2 THEN RETURN dw_1.AcceptText( ) ll_limitprice = dw_1.Object.iflimitprice[1] FOR i = 1 To dw_1.RowCount() dw_1.Object.iflimitprice[i] = ll_limitprice NEXT end event type cb_mod from uo_imflatbutton within w_mtrldef_edit_limitprice integer x = 453 integer width = 151 integer height = 164 integer taborder = 30 boolean bringtotop = true string text = "修改" string normalpicname = "open.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF NOT f_power_ind(842) THEN MessageBox('提示','你没有使用权限!', Information!, OK! ) RETURN END IF if dw_edit_mode then if messagebox('提示',"是否要确定放弃保存资料",exclamation!,yesno!,2) = 2 then return end if end if dw_edit_mode = NOT dw_edit_mode if not dw_edit_mode then cb_1.triggerevent(clicked!) end if wf_face() end event type tv_1 from uo_tv_mtrltype within w_mtrldef_edit_limitprice integer y = 300 integer width = 800 integer height = 1932 integer taborder = 90 boolean bringtotop = true integer textsize = -9 fontcharset fontcharset = gb2312charset! fontfamily fontfamily = anyfont! string facename = "宋体" end type event selectionchanged;call super::selectionchanged;ls_handtype = THIS.uo_cur_info.handtype ls_handtype = ls_handtype + "%" cb_1.triggerevent(clicked!) end event