$PBExportHeader$w_cust_ch.srw forward global type w_cust_ch from w_publ_choice end type type tv_1 from uo_tv_cusarea within w_cust_ch end type end forward global type w_cust_ch from w_publ_choice integer width = 2949 integer height = 2328 string title = "客户选择" tv_1 tv_1 end type global w_cust_ch w_cust_ch type variables s_custom ins_rt_stru string obj_cuscode String ls_areaname = '' end variables on w_cust_ch.create int iCurrent call super::create this.tv_1=create tv_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.tv_1 end on on w_cust_ch.destroy call super::destroy destroy(this.tv_1) end on event close;call super::close;CLOSEWITHRETURN(THIS,ins_rt_stru) 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+'( cuscode LIKE "%'+Trim(sle_ch.Text)+'%" )' ELSE obj_expr = obj_expr+'( Lower(cuscode) LIKE "'+Trim(sle_ch.Text)+'" )' END IF END IF IF Trim(sle_ch.Text) <> '' THEN IF obj_expr <> '' THEN obj_expr = obj_expr+ ' or ' IF Pos(Trim(sle_ch.Text),'%') = 0 THEN obj_expr = obj_expr+' ( name LIKE "%'+Trim(sle_ch.Text)+'%" )' ELSE obj_expr = obj_expr+'( name LIKE "'+Trim(sle_ch.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_cuscode = Message.StringParm IF obj_cuscode <> '' THEN sle_ch.Text = obj_cuscode THIS.TriggerEvent("dw_filter") END IF s_hide_col s_col_cusname s_col_cusname.col_1 = 'name' f_hide_col(1306,dw_ch,s_col_cusname) end event type cb_func from w_publ_choice`cb_func within w_cust_ch end type type cb_exit from w_publ_choice`cb_exit within w_cust_ch integer taborder = 50 end type type sle_ch from w_publ_choice`sle_ch within w_cust_ch integer x = 379 integer y = 184 integer width = 955 end type type dw_ch from w_publ_choice`dw_ch within w_cust_ch integer x = 997 integer width = 1920 integer height = 1940 string dataobject = "dw_cust_ch" boolean hsplitscroll = false end type type st_1 from w_publ_choice`st_1 within w_cust_ch integer x = 18 integer y = 204 integer width = 343 string text = "编号/名称含:" alignment alignment = right! boolean righttoleft = false end type type cb_retrieve from w_publ_choice`cb_retrieve within w_cust_ch integer taborder = 60 end type event cb_retrieve::clicked;dw_ch.retrieve(ls_areaname, sys_user_outrep, sys_option_outrep) THIS.TriggerEvent("dw_filter") end event type cb_choice from w_publ_choice`cb_choice within w_cust_ch 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 INS_RT_STRU.cusid = dw_CH.Object.cusid[LS_ROW] INS_RT_STRU.Name = dw_CH.Object.Name[LS_ROW] INS_RT_STRU.cuscode = dw_CH.Object.cuscode[LS_ROW] INS_RT_STRU.custype = dw_CH.Object.custype[LS_ROW] Close(PARENT) end event type ln_bar from w_publ_choice`ln_bar within w_cust_ch end type type ln_bar2 from w_publ_choice`ln_bar2 within w_cust_ch end type type r_bar from w_publ_choice`r_bar within w_cust_ch end type type ln_1 from w_publ_choice`ln_1 within w_cust_ch end type type ln_2 from w_publ_choice`ln_2 within w_cust_ch end type type tv_1 from uo_tv_cusarea within w_cust_ch integer y = 288 integer width = 997 integer height = 1940 integer taborder = 60 boolean bringtotop = true integer textsize = -9 fontcharset fontcharset = gb2312charset! fontfamily fontfamily = anyfont! string facename = "宋体" end type event selectionchanged;call super::selectionchanged;ls_areaname = THIS.uo_cur_info.areaname ls_areaname = ls_areaname + '%' cb_retrieve.TriggerEvent(Clicked!) end event