$PBExportHeader$w_pz_code_edit.srw forward global type w_pz_code_edit from w_publ_base end type type dw_status from u_dw_rbtnfilter within w_pz_code_edit end type type dw_pcode from u_dw_rbtnfilter within w_pz_code_edit end type type dw_woodcode from u_dw_rbtnfilter within w_pz_code_edit end type type cb_modstatus from uo_imflatbutton within w_pz_code_edit end type type cb_delstatus from uo_imflatbutton within w_pz_code_edit end type type cb_retrstatus from uo_imflatbutton within w_pz_code_edit end type type cb_addlstatus from uo_imflatbutton within w_pz_code_edit end type type cb_modwood from uo_imflatbutton within w_pz_code_edit end type type cb_delwood from uo_imflatbutton within w_pz_code_edit end type type cb_retrwood from uo_imflatbutton within w_pz_code_edit end type type cb_addwood from uo_imflatbutton within w_pz_code_edit end type type cb_modpcode from uo_imflatbutton within w_pz_code_edit end type type cb_delpcode from uo_imflatbutton within w_pz_code_edit end type type cb_retrpcode from uo_imflatbutton within w_pz_code_edit end type type cb_addpcode from uo_imflatbutton within w_pz_code_edit end type type cb_help from uo_imflatbutton within w_pz_code_edit end type type ln_bar from line within w_pz_code_edit end type type ln_bar2 from line within w_pz_code_edit end type type r_bar from rectangle within w_pz_code_edit end type type ln_1 from line within w_pz_code_edit end type type ln_2 from line within w_pz_code_edit end type type ln_3 from line within w_pz_code_edit end type type ln_4 from line within w_pz_code_edit end type end forward global type w_pz_code_edit from w_publ_base integer width = 3611 integer height = 2380 string title = "配置属性" event ue_help ( ) dw_status dw_status dw_pcode dw_pcode dw_woodcode dw_woodcode cb_modstatus cb_modstatus cb_delstatus cb_delstatus cb_retrstatus cb_retrstatus cb_addlstatus cb_addlstatus cb_modwood cb_modwood cb_delwood cb_delwood cb_retrwood cb_retrwood cb_addwood cb_addwood cb_modpcode cb_modpcode cb_delpcode cb_delpcode cb_retrpcode cb_retrpcode cb_addpcode cb_addpcode cb_help cb_help ln_bar ln_bar ln_bar2 ln_bar2 r_bar r_bar ln_1 ln_1 ln_2 ln_2 ln_3 ln_3 ln_4 ln_4 end type global w_pz_code_edit w_pz_code_edit event ue_help();Int i i = htmlhelpA(Handle(THIS),sys_help_chm, 0, THIS.Title+".htm") end event on w_pz_code_edit.create int iCurrent call super::create this.dw_status=create dw_status this.dw_pcode=create dw_pcode this.dw_woodcode=create dw_woodcode this.cb_modstatus=create cb_modstatus this.cb_delstatus=create cb_delstatus this.cb_retrstatus=create cb_retrstatus this.cb_addlstatus=create cb_addlstatus this.cb_modwood=create cb_modwood this.cb_delwood=create cb_delwood this.cb_retrwood=create cb_retrwood this.cb_addwood=create cb_addwood this.cb_modpcode=create cb_modpcode this.cb_delpcode=create cb_delpcode this.cb_retrpcode=create cb_retrpcode this.cb_addpcode=create cb_addpcode this.cb_help=create cb_help this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.r_bar=create r_bar this.ln_1=create ln_1 this.ln_2=create ln_2 this.ln_3=create ln_3 this.ln_4=create ln_4 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.dw_status this.Control[iCurrent+2]=this.dw_pcode this.Control[iCurrent+3]=this.dw_woodcode this.Control[iCurrent+4]=this.cb_modstatus this.Control[iCurrent+5]=this.cb_delstatus this.Control[iCurrent+6]=this.cb_retrstatus this.Control[iCurrent+7]=this.cb_addlstatus this.Control[iCurrent+8]=this.cb_modwood this.Control[iCurrent+9]=this.cb_delwood this.Control[iCurrent+10]=this.cb_retrwood this.Control[iCurrent+11]=this.cb_addwood this.Control[iCurrent+12]=this.cb_modpcode this.Control[iCurrent+13]=this.cb_delpcode this.Control[iCurrent+14]=this.cb_retrpcode this.Control[iCurrent+15]=this.cb_addpcode this.Control[iCurrent+16]=this.cb_help this.Control[iCurrent+17]=this.ln_bar this.Control[iCurrent+18]=this.ln_bar2 this.Control[iCurrent+19]=this.r_bar this.Control[iCurrent+20]=this.ln_1 this.Control[iCurrent+21]=this.ln_2 this.Control[iCurrent+22]=this.ln_3 this.Control[iCurrent+23]=this.ln_4 end on on w_pz_code_edit.destroy call super::destroy destroy(this.dw_status) destroy(this.dw_pcode) destroy(this.dw_woodcode) destroy(this.cb_modstatus) destroy(this.cb_delstatus) destroy(this.cb_retrstatus) destroy(this.cb_addlstatus) destroy(this.cb_modwood) destroy(this.cb_delwood) destroy(this.cb_retrwood) destroy(this.cb_addwood) destroy(this.cb_modpcode) destroy(this.cb_delpcode) destroy(this.cb_retrpcode) destroy(this.cb_addpcode) destroy(this.cb_help) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.r_bar) destroy(this.ln_1) destroy(this.ln_2) destroy(this.ln_3) destroy(this.ln_4) end on event open;call super::open;dw_status.SetTransObject(sqlca) dw_woodcode.SetTransObject(sqlca) dw_pcode.SetTransObject(sqlca) cb_retrstatus.TriggerEvent(Clicked!) cb_retrwood.TriggerEvent(Clicked!) cb_retrpcode.TriggerEvent(Clicked!) IF sys_option_change_status = '' THEN dw_status.Title = '配置' ELSE dw_status.Title = sys_option_change_status END IF IF sys_option_change_woodcode = '' THEN dw_woodcode.Title = '配置1' ELSE dw_woodcode.Title = sys_option_change_woodcode END IF IF sys_option_change_pcode = '' THEN dw_pcode.Title = '配置2' ELSE dw_pcode.Title = sys_option_change_pcode END IF end event event resize;call super::resize;ln_bar.EndX = THIS.Width ln_bar2.EndX = THIS.Width r_bar.Width = THIS.Width end event event key;call super::key;IF KeyDown(KeyF1!) THEN THIS.TriggerEvent('ue_help') end if end event type cb_func from w_publ_base`cb_func within w_pz_code_edit boolean visible = false end type type cb_exit from w_publ_base`cb_exit within w_pz_code_edit integer x = 3410 integer width = 165 integer height = 164 integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type dw_status from u_dw_rbtnfilter within w_pz_code_edit integer y = 184 integer width = 1157 integer height = 2060 integer taborder = 20 boolean bringtotop = true boolean titlebar = true string dataobject = "dw_status_edit" boolean hscrollbar = true boolean vscrollbar = true boolean resizable = true borderstyle borderstyle = stylebox! end type event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) END IF end event event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序-功能开关 RBUTTON_FILTER_USE=true //右键查询-功能开关 setcolumn_visible_USE= true //自动保存显示列-功能开关 autosave_setlayout_USE= true //自动保存列位置及宽度-功能开关 end event type dw_pcode from u_dw_rbtnfilter within w_pz_code_edit integer x = 2377 integer y = 184 integer width = 1184 integer height = 2060 integer taborder = 30 boolean bringtotop = true boolean titlebar = true string dataobject = "dw_pcode_edit" boolean hscrollbar = true boolean vscrollbar = true boolean resizable = true borderstyle borderstyle = stylebox! end type event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) END IF end event event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序-功能开关 RBUTTON_FILTER_USE=true //右键查询-功能开关 setcolumn_visible_USE= true //自动保存显示列-功能开关 autosave_setlayout_USE= true //自动保存列位置及宽度-功能开关 end event type dw_woodcode from u_dw_rbtnfilter within w_pz_code_edit integer x = 1175 integer y = 184 integer width = 1184 integer height = 2060 integer taborder = 30 boolean bringtotop = true boolean titlebar = true string dataobject = "dw_woodcode_edit" boolean hscrollbar = true boolean vscrollbar = true boolean resizable = true borderstyle borderstyle = stylebox! end type event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) END IF end event event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序-功能开关 RBUTTON_FILTER_USE=true //右键查询-功能开关 setcolumn_visible_USE= true //自动保存显示列-功能开关 autosave_setlayout_USE= true //自动保存列位置及宽度-功能开关 end event type cb_modstatus from uo_imflatbutton within w_pz_code_edit integer x = 165 integer width = 165 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(24) THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF Long ls_id,ll_row ll_row = dw_status.getrow() if ll_row <= 0 then messagebox('提示','请选择类型') return end if ls_id = dw_status.object.colorid[ll_row] s_edit_index_tran s_inscust s_inscust.b_long = 0 s_inscust.c_long = ls_id OpenWithParm(w_pz_code_add_edit,s_inscust) cb_retrstatus.TriggerEvent(Clicked!) end event type cb_delstatus from uo_imflatbutton within w_pz_code_edit integer x = 329 integer width = 165 integer height = 164 integer taborder = 40 boolean bringtotop = true string text = "删除" string normalpicname = "delete.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF NOT f_power_ind(24) THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF String ls_typename Long ll_typeid,row row = dw_status.GetRow() IF NOT row > 0 THEN MessageBox('错误','请选择当前配置!') RETURN END IF ls_typename = dw_status.Object.status[row] IF MessageBox ("全部","是否确定要删除'"+ls_typename+"'吗?",Question!,YesNo! ) = 2 THEN RETURN ll_typeid = dw_status.Object.colorid[row] DELETE u_color Where colorid = :ll_typeid; IF sqlca.SQLCode <> 0 THEN ROLLBACK; MessageBox('失败','删除配置操作失败!') RETURN END IF COMMIT; cb_retrstatus.TriggerEvent(Clicked!) end event type cb_retrstatus from uo_imflatbutton within w_pz_code_edit integer x = 494 integer width = 165 integer height = 164 integer taborder = 50 boolean bringtotop = true string text = "刷新" string normalpicname = "refresh.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;dw_status.SetFilter('') dw_status.Filter() IF dw_status.Retrieve() > 0 THEN dw_status.SelectRow(0,FALSE) dw_status.SetRow(1) dw_status.SelectRow(1,TRUE) END IF end event type cb_addlstatus from uo_imflatbutton within w_pz_code_edit integer width = 165 integer height = 164 integer taborder = 10 boolean bringtotop = true string text = "增加" string normalpicname = "new.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF NOT f_power_ind(24) THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF s_edit_index_tran s_inscust s_inscust.b_long = 0 s_inscust.c_long = 0 OpenWithParm(w_pz_code_add_edit,s_inscust) cb_retrstatus.TriggerEvent(Clicked!) end event type cb_modwood from uo_imflatbutton within w_pz_code_edit integer x = 1349 integer width = 165 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(1403) THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF Long ls_id,ll_row ll_row = dw_woodcode.getrow() if ll_row <= 0 then messagebox('提示','请选择类型') return end if ls_id = dw_woodcode.object.woodcodeid[ll_row] s_edit_index_tran s_inscust s_inscust.b_long = 1 s_inscust.c_long = ls_id OpenWithParm(w_pz_code_add_edit,s_inscust) cb_retrwood.TriggerEvent(Clicked!) end event type cb_delwood from uo_imflatbutton within w_pz_code_edit integer x = 1513 integer width = 165 integer height = 164 integer taborder = 40 boolean bringtotop = true string text = "删除" string normalpicname = "delete.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF NOT f_power_ind(1403) THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF String ls_typename Long ll_typeid,row row = dw_woodcode.GetRow() IF NOT row > 0 THEN MessageBox('错误','请选择当前配置!') RETURN END IF ls_typename = dw_woodcode.Object.woodcode[row] IF MessageBox ("全部","是否确定要删除'"+ls_typename+"'吗?",Question!,YesNo! ) = 2 THEN RETURN ll_typeid = dw_woodcode.Object.woodcodeid[row] DELETE u_color_wood Where woodcodeid = :ll_typeid; IF sqlca.SQLCode <> 0 THEN ROLLBACK; MessageBox('失败','删除配置操作失败!') RETURN END IF COMMIT; cb_retrwood.TriggerEvent(Clicked!) end event type cb_retrwood from uo_imflatbutton within w_pz_code_edit integer x = 1678 integer width = 165 integer height = 164 integer taborder = 50 boolean bringtotop = true string text = "刷新" string normalpicname = "refresh.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;dw_woodcode.SetFilter('') dw_woodcode.Filter() IF dw_woodcode.Retrieve() > 0 THEN dw_woodcode.SelectRow(0,FALSE) dw_woodcode.SetRow(1) dw_woodcode.SelectRow(1,TRUE) END IF end event type cb_addwood from uo_imflatbutton within w_pz_code_edit integer x = 1184 integer width = 165 integer height = 164 integer taborder = 10 boolean bringtotop = true string text = "增加" string normalpicname = "new.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF NOT f_power_ind(1403) THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF s_edit_index_tran s_inscust s_inscust.b_long = 1 s_inscust.c_long = 0 OpenWithParm(w_pz_code_add_edit,s_inscust) cb_retrwood.TriggerEvent(Clicked!) end event type cb_modpcode from uo_imflatbutton within w_pz_code_edit integer x = 2555 integer width = 165 integer height = 164 integer taborder = 20 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(1404) THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF Long ls_id,ll_row ll_row = dw_pcode.GetRow() IF ll_row <= 0 THEN MessageBox('提示','请选择类型') RETURN END IF ls_id = dw_pcode.Object.pcodeid[ll_row] s_edit_index_tran s_inscust s_inscust.b_long = 2 s_inscust.c_long = ls_id OpenWithParm(w_pz_code_add_edit,s_inscust) cb_retrpcode.TriggerEvent(Clicked!) end event type cb_delpcode from uo_imflatbutton within w_pz_code_edit integer x = 2720 integer width = 165 integer height = 164 integer taborder = 40 boolean bringtotop = true string text = "删除" string normalpicname = "delete.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF NOT f_power_ind(1404) THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF String ls_typename Long ll_typeid,row row = dw_pcode.GetRow() IF NOT row > 0 THEN MessageBox('错误','请选择当前配置!') RETURN END IF ls_typename = dw_pcode.Object.pcode[row] IF MessageBox ("全部","是否确定要删除'"+ls_typename+"'吗?",Question!,YesNo! ) = 2 THEN RETURN ll_typeid = dw_pcode.Object.pcodeid[row] DELETE u_color_pcode Where pcodeid = :ll_typeid; IF sqlca.SQLCode <> 0 THEN ROLLBACK; MessageBox('失败','删除配置操作失败!') RETURN END IF COMMIT; cb_retrpcode.TriggerEvent(Clicked!) end event type cb_retrpcode from uo_imflatbutton within w_pz_code_edit integer x = 2885 integer width = 165 integer height = 164 integer taborder = 50 boolean bringtotop = true string text = "刷新" string normalpicname = "refresh.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;dw_pcode.SetFilter('') dw_pcode.Filter() IF dw_pcode.Retrieve() > 0 THEN dw_pcode.SelectRow(0,FALSE) dw_pcode.SetRow(1) dw_pcode.SelectRow(1,TRUE) END IF end event type cb_addpcode from uo_imflatbutton within w_pz_code_edit integer x = 2391 integer width = 165 integer height = 164 integer taborder = 60 boolean bringtotop = true string text = "增加" string normalpicname = "new.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF NOT f_power_ind(1404) THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF s_edit_index_tran s_inscust s_inscust.b_long = 2 s_inscust.c_long = 0 OpenWithParm(w_pz_code_add_edit,s_inscust) cb_retrpcode.TriggerEvent(Clicked!) end event type cb_help from uo_imflatbutton within w_pz_code_edit integer x = 3259 integer width = 151 integer height = 164 integer taborder = 60 boolean bringtotop = true string text = "帮助" string normalpicname = "help.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;PARENT.TriggerEvent('ue_help') end event type ln_bar from line within w_pz_code_edit long linecolor = 268435456 integer linethickness = 4 integer beginy = 172 integer endx = 3323 integer endy = 172 end type type ln_bar2 from line within w_pz_code_edit long linecolor = 16777215 integer linethickness = 4 integer beginy = 176 integer endx = 3323 integer endy = 176 end type type r_bar from rectangle within w_pz_code_edit long linecolor = 16777215 long fillcolor = 1073741824 integer x = 2555 integer width = 73 integer height = 172 end type event constructor;this.fillcolor = 14215660 this.linecolor = 14215660 this.x = -1 this.y = -1 this.height = ln_bar2.beginy - 5 end event type ln_1 from line within w_pz_code_edit long linecolor = 268435456 integer linethickness = 4 integer beginx = 1157 integer endx = 1157 integer endy = 164 end type type ln_2 from line within w_pz_code_edit long linecolor = 16777215 integer linethickness = 4 integer beginx = 1161 integer endx = 1161 integer endy = 164 end type type ln_3 from line within w_pz_code_edit long linecolor = 268435456 integer linethickness = 4 integer beginx = 2354 integer beginy = 4 integer endx = 2354 integer endy = 168 end type type ln_4 from line within w_pz_code_edit long linecolor = 16777215 integer linethickness = 4 integer beginx = 2359 integer beginy = 4 integer endx = 2359 integer endy = 168 end type