$PBExportHeader$w_empinfo_choice.srw forward global type w_empinfo_choice from w_publ_choice end type type st_2 from statictext within w_empinfo_choice end type type sle_name from u_sleedit within w_empinfo_choice end type end forward global type w_empinfo_choice from w_publ_choice integer width = 2318 integer height = 1668 string title = "人员选择" st_2 st_2 sle_name sle_name end type global w_empinfo_choice w_empinfo_choice type variables s_empselect s_select string obj_empcode end variables on w_empinfo_choice.create int iCurrent call super::create this.st_2=create st_2 this.sle_name=create sle_name iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.st_2 this.Control[iCurrent+2]=this.sle_name end on on w_empinfo_choice.destroy call super::destroy destroy(this.st_2) destroy(this.sle_name) end on event close;call super::close;CLOSEWITHRETURN(THIS,s_select) end event event dw_filter;//string filterstr //filterstr=""+trim(sle_ch.text) // String obj_expr = '' IF Trim(sle_ch.Text) <> '' THEN IF Pos(Trim(sle_ch.Text),'%') = 0 THEN obj_expr = obj_expr+'( Lower(u_rs_empinfo_empcode) LIKE "%'+Lower(Trim(sle_ch.Text))+'%" )' ELSE obj_expr = obj_expr+'( Lower(u_rs_empinfo_empcode) LIKE "'+Lower(Trim(sle_ch.Text))+'" )' END IF END IF IF Trim(sle_name.Text) <> '' THEN IF obj_expr <> '' THEN obj_expr = obj_expr+ ' or ' IF Pos(Trim(sle_ch.Text),'%') = 0 THEN obj_expr = obj_expr+' ( u_rs_empinfo_empname LIKE "%'+Trim(sle_name.Text)+'%" )' ELSE obj_expr = obj_expr+'( u_rs_empinfo_empname LIKE "'+Trim(sle_name.Text)+'" )' END IF END IF dw_ch.SetFilter(obj_expr) dw_ch.SetRedraw(FALSE) dw_ch.Filter() IF dw_ch.RowCount() >= 1 THEN dw_ch.SelectRow(0,FALSE) dw_ch.SelectRow(1,TRUE) END IF dw_ch.SetRedraw(TRUE) end event event open;call super::open;obj_empcode=message.stringparm if obj_empcode<>'' then sle_ch.text=obj_empcode sle_name.text=obj_empcode this.triggerevent("dw_filter") end if end event type cb_func from w_publ_choice`cb_func within w_empinfo_choice end type type cb_exit from w_publ_choice`cb_exit within w_empinfo_choice integer taborder = 50 end type type sle_ch from w_publ_choice`sle_ch within w_empinfo_choice integer x = 238 integer width = 389 end type type dw_ch from w_publ_choice`dw_ch within w_empinfo_choice integer width = 2272 integer height = 1216 string dataobject = "dw_rs_empinfo_choice" boolean hscrollbar = false boolean hsplitscroll = false end type type st_1 from w_publ_choice`st_1 within w_empinfo_choice integer x = 23 integer width = 210 string text = "工号含:" boolean righttoleft = false end type type cb_retrieve from w_publ_choice`cb_retrieve within w_empinfo_choice integer taborder = 60 end type event cb_retrieve::clicked;dw_ch.retrieve() end event type cb_choice from w_publ_choice`cb_choice within w_empinfo_choice end type event cb_choice::clicked;LONG LS_ROW LS_ROW=dw_CH.getrow() if LS_ROW<=0 then messagebox('提示','请先选择目标行!', Information!, OK! ) return end if s_select.empid=dw_ch.object.u_rs_empinfo_empid[dw_ch.getrow()] s_select.empcode=dw_ch.object.u_rs_empinfo_empcode[dw_ch.getrow()] s_select.empname=dw_ch.object.u_rs_empinfo_empname[dw_ch.getrow()] s_select.duty = dw_ch.object.u_rs_empinfo_duty[dw_ch.getrow()] CLOSE(PARENT) end event type ln_bar from w_publ_choice`ln_bar within w_empinfo_choice end type type ln_bar2 from w_publ_choice`ln_bar2 within w_empinfo_choice end type type r_bar from w_publ_choice`r_bar within w_empinfo_choice end type type ln_1 from w_publ_choice`ln_1 within w_empinfo_choice end type type ln_2 from w_publ_choice`ln_2 within w_empinfo_choice end type type st_2 from statictext within w_empinfo_choice integer x = 722 integer y = 212 integer width = 201 integer height = 60 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 = "姓名含:" boolean focusrectangle = false end type type sle_name from u_sleedit within w_empinfo_choice integer x = 928 integer y = 196 integer width = 416 integer taborder = 20 boolean bringtotop = true end type event inputchanged;PARENT.POSTEVENT('DW_FILTER') end event