$PBExportHeader$w_certi_static.srw forward global type w_certi_static from w_publ_base end type type dw_tbinfor from u_dw_rbtnfilter within w_certi_static end type type dw_uc from datawindow within w_certi_static end type type cb_add from uo_imflatbutton within w_certi_static end type type cb_edit from uo_imflatbutton within w_certi_static end type type cb_delet from uo_imflatbutton within w_certi_static end type type gb_1 from groupbox within w_certi_static end type type gb_2 from groupbox within w_certi_static end type type cb_retrieve from uo_imflatbutton within w_certi_static end type type cb_print from uo_imflatbutton within w_certi_static end type type cb_help from uo_imflatbutton within w_certi_static end type type r_bar from rectangle within w_certi_static end type type ln_bar from line within w_certi_static end type type ln_bar2 from line within w_certi_static end type end forward global type w_certi_static from w_publ_base integer width = 2670 integer height = 2052 string title = "人事静态信息" dw_tbinfor dw_tbinfor dw_uc dw_uc cb_add cb_add cb_edit cb_edit cb_delet cb_delet gb_1 gb_1 gb_2 gb_2 cb_retrieve cb_retrieve cb_print cb_print cb_help cb_help r_bar r_bar ln_bar ln_bar ln_bar2 ln_bar2 end type global w_certi_static w_certi_static type variables BOOLEAN LS_UPDATE_FLAG=TRUE LONG MODIFYROW_NO=0,CRL_ROW //当前行记录 s_edit_tran PARA_OBJ //环境信息用于查询 string keyword_STRING //关键字 未用 DATE FIRST_DATE //查询开始日 DATE END_DATE //查询结束日,比表达日后一天 INT CHILD_COLUMN_INT //明细DW锁定列数 string ins_sqlerrtext boolean if_retrieveing=false long point_currow end variables forward prototypes public function integer wf_face_change () end prototypes public function integer wf_face_change ();IF dw_edit_mode THEN cb_retrieve.Enabled = FALSE cb_delet.Enabled = FALSE cb_print.Enabled = FALSE cb_edit.Text = "放弃&E" cb_add.Text = "保存&S" cb_edit.normalpicname = 'Undo.bmp' cb_add.normalpicname = 'Save.bmp' ELSE cb_retrieve.Enabled = TRUE cb_delet.Enabled = TRUE cb_print.Enabled = TRUE cb_edit.Text = "修改&E" cb_add.Text = "新建&S" cb_edit.normalpicname = 'OPEN.bmp' cb_add.normalpicname = 'new.bmp' END IF cb_edit.of_init_draw() cb_add.of_init_draw() cb_edit.of_paint() cb_add.of_paint() cb_add.triggerevent('ue_textchange') cb_edit.triggerevent('ue_textchange') RETURN 1 end function on w_certi_static.create int iCurrent call super::create this.dw_tbinfor=create dw_tbinfor this.dw_uc=create dw_uc this.cb_add=create cb_add this.cb_edit=create cb_edit this.cb_delet=create cb_delet this.gb_1=create gb_1 this.gb_2=create gb_2 this.cb_retrieve=create cb_retrieve this.cb_print=create cb_print this.cb_help=create cb_help this.r_bar=create r_bar this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.dw_tbinfor this.Control[iCurrent+2]=this.dw_uc this.Control[iCurrent+3]=this.cb_add this.Control[iCurrent+4]=this.cb_edit this.Control[iCurrent+5]=this.cb_delet this.Control[iCurrent+6]=this.gb_1 this.Control[iCurrent+7]=this.gb_2 this.Control[iCurrent+8]=this.cb_retrieve this.Control[iCurrent+9]=this.cb_print this.Control[iCurrent+10]=this.cb_help this.Control[iCurrent+11]=this.r_bar this.Control[iCurrent+12]=this.ln_bar this.Control[iCurrent+13]=this.ln_bar2 end on on w_certi_static.destroy call super::destroy destroy(this.dw_tbinfor) destroy(this.dw_uc) destroy(this.cb_add) destroy(this.cb_edit) destroy(this.cb_delet) destroy(this.gb_1) destroy(this.gb_2) destroy(this.cb_retrieve) destroy(this.cb_print) destroy(this.cb_help) destroy(this.r_bar) destroy(this.ln_bar) destroy(this.ln_bar2) end on event open;call super::open;long i dw_edit_mode=false dw_uc.settransobject(sqlca) dw_tbinfor.settransobject(sqlca) dw_tbinfor.retrieve() dw_uc.object.static_id.protect=1 dw_uc.object.static_script.protect=1 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 cb_help.TriggerEvent(clicked!) end if end event type cb_func from w_publ_base`cb_func within w_certi_static boolean visible = false integer x = 1486 integer width = 279 boolean enabled = false end type type cb_exit from w_publ_base`cb_exit within w_certi_static integer x = 987 integer width = 151 integer height = 172 integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type dw_tbinfor from u_dw_rbtnfilter within w_certi_static integer x = 18 integer y = 256 integer width = 1275 integer height = 1652 integer taborder = 20 boolean bringtotop = true string dataobject = "dw_tbinfor" boolean hscrollbar = true boolean vscrollbar = true end type event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关 RBUTTON_FILTER_USE=true //右键查询功能开关 end event event rowfocuschanged;call super::rowfocuschanged;if this.getrow()<=0 then dw_uc.reset() return end if point_currow=this.getrow() dw_uc.retrieve(this.object.gx_id[this.getrow()]) if this.getrow()>0 and this.getrow()<=this.rowcount() then dw_tbinfor.selectrow(0,false) dw_tbinfor.selectrow(this.getrow(),true) END IF end event event rowfocuschanging;call super::rowfocuschanging;if dw_edit_mode then return 1 end event type dw_uc from datawindow within w_certi_static integer x = 1385 integer y = 256 integer width = 1189 integer height = 1652 integer taborder = 30 boolean bringtotop = true string title = "none" string dataobject = "dw_static_script" boolean hscrollbar = true boolean vscrollbar = true boolean livescroll = true borderstyle borderstyle = stylelowered! end type event clicked;IF row > 0 then THIS.selectrow(0,false) THIS.selectrow(row,true) THIS.setrow(row) end if end event type cb_add from uo_imflatbutton within w_certi_static string tag = "新建Alt+S" integer width = 192 integer height = 172 integer taborder = 20 boolean bringtotop = true string text = "新建&S" 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(193) then messagebox('提示','你没有使用权限!',information!,OK!) return end if if dw_tbinfor.rowcount()=0 then messagebox("提示","没有可添加",information!,OK!) return end if IF dw_edit_mode THEN string ls_errmsg int li_currentrow li_currentrow=dw_uc.getrow() dw_uc.setrow(li_currentrow) if isnull(dw_uc.object.static_id[li_currentrow]) or isnull(dw_uc.object.static_script[li_currentrow]) then messagebox("提示","请输入具体信息",information!,OK!) return end if dw_uc.object.static_id[li_currentrow]=trim(dw_uc.object.static_id[li_currentrow]) dw_uc.object.static_script[li_currentrow]=trim(dw_uc.object.static_script[li_currentrow]) if dw_UC.Update() = -1 then if pos(ins_sqlerrtext,"Cannot insert duplicate key row")>0 then ls_errmsg="关键内容重复" else ls_errmsg="因为网络,代号重复或其他原因" end if rollback; MessageBox ("错误",ls_errmsg+",保存操作失败!",stopsign!,OK!) LS_UPDATE_FLAG=FALSE RETURN else commit; LS_UPDATE_FLAG=TRUE end if dw_uc.object.static_id.protect=1 dw_uc.object.static_script.protect=1 ins_sqlerrtext="" cb_delet.enabled=false ELSE long LL_gx_id // 保存联系ID long LL_Ser_id // 保存选项序列 int li_row, li_cur_row LL_gx_id=dw_tbinfor.GetRow() LL_gx_id=dw_tbinfor.object.gx_id[LL_gx_id] LL_ser_id=dw_uc.RowCount()+1 li_cur_row = dw_UC.GetRow() li_row = dw_UC.InsertRow (0) dw_uc.object.gx_id[LL_ser_id]=LL_gx_id dw_uc.object.static_id.protect=0 dw_uc.object.static_script.protect=0 dw_UC.ScrollToRow (li_row) dw_UC.SetFocus() modifyrow_no= li_row Ls_UpDate_Flag=false END IF dw_edit_mode= NOT dw_edit_mode WF_FACE_CHANGE() //dw_uc.SetRedraw (true) end event type cb_edit from uo_imflatbutton within w_certi_static string tag = "修改Alt+E" integer x = 192 integer width = 192 integer height = 172 integer taborder = 30 boolean bringtotop = true string text = "修改&E" 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(193) then messagebox('提示','你没有使用权限!',information!,OK!) return end if IF dw_edit_mode THEN if dw_uc.GetItemStatus(dw_UC.getrow(), 0, Primary!)=NewModified! or dw_uc.GetItemStatus(dw_UC.getrow(), 0, Primary!)=New! then dw_UC.deleterow(dw_UC.getrow()) else dw_UC.ReselectRow(dw_UC.getrow()) end if modifyrow_no = 0 dw_uc.object.static_id.protect=1 dw_uc.object.static_script.protect=1 Ls_update_flag=true ELSE dw_UC.SetFocus() modifyrow_no = dw_UC.getrow() dw_uc.object.static_id.protect=0 dw_uc.object.static_script.protect=0 END IF cb_delet.enabled=NOT dw_edit_mode dw_edit_mode= NOT dw_edit_mode WF_FACE_CHANGE() end event type cb_delet from uo_imflatbutton within w_certi_static integer x = 384 integer width = 151 integer height = 172 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(193) then messagebox('提示','你没有使用权限!',information!,OK!) return end if IF dw_uc.RowCount() = 0 THEN MessageBox("提示","当前没有可删除的纪录",information!,OK!) RETURN END IF IF MessageBox ("询问","是否确定要删除当前记录?(选择确定后记录将不可恢复)",Question!,YesNo! ) = 2 THEN RETURN END IF dw_uc.SetRedraw (FALSE) dw_uc.DeleteRow (0) dw_uc.TriggerEvent (RowFocusChanged!) IF dw_uc.UPDATE() = -1 THEN ROLLBACK; MessageBox ("错误","删除记录操作失败!",stopsign!,OK!) ELSE COMMIT; END IF dw_uc.SetRedraw (TRUE) end event type gb_1 from groupbox within w_certi_static integer y = 196 integer width = 1321 integer height = 1736 integer taborder = 10 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 gb_2 from groupbox within w_certi_static integer x = 1353 integer y = 196 integer width = 1271 integer height = 1736 integer taborder = 30 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 cb_retrieve from uo_imflatbutton within w_certi_static integer x = 535 integer width = 151 integer height = 172 integer taborder = 30 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;if dw_uc.rowcount()>0 then dw_uc.SetRedraw (false) int li_cur_row li_cur_row= dw_UC.GetRow() dw_uc.retrieve(dw_uc.object.gx_id[dw_uc.rowcount()]) if li_cur_row<>0 and li_cur_row<=dw_uc.rowcount() then dw_UC.ScrollToRow (li_cur_row) dw_uc.SetRedraw (true) end if end event type cb_print from uo_imflatbutton within w_certi_static integer x = 837 integer width = 151 integer height = 172 integer taborder = 40 boolean bringtotop = true string text = "预览" string normalpicname = "print.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;S_print_MSG LS_PRMSG LS_PRMSG.obj_dwNAME='dw_statictb_print' LS_PRMSG.TAG_TEXT='' LS_PRMSG.SETUP_FLAG=0 LS_PRMSG.PAGECH_FLAG=1 LS_PRMSG.retr_pram_falg=5 Openwithparm(w_publ_preview,LS_PRMSG) end event type cb_help from uo_imflatbutton within w_certi_static string tag = "帮助[F1]" integer x = 686 integer width = 151 integer height = 172 integer taborder = 30 boolean bringtotop = true string text = "帮助" string normalpicname = "help.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type r_bar from rectangle within w_certi_static long linecolor = 16777215 long fillcolor = 1073741824 integer x = 1929 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_bar from line within w_certi_static long linecolor = 268435456 integer linethickness = 4 integer beginy = 176 integer endx = 2098 integer endy = 176 end type type ln_bar2 from line within w_certi_static long linecolor = 16777215 integer linethickness = 4 integer beginy = 180 integer endx = 2098 integer endy = 180 end type