$PBExportHeader$w_subjectdef_ch.srw forward global type w_subjectdef_ch from w_publ_choice end type end forward global type w_subjectdef_ch from w_publ_choice integer width = 3511 integer height = 2280 string title = "科目选择" long backcolor = 83162356 end type global w_subjectdef_ch w_subjectdef_ch type variables s_subject s_rt_subject long accsetid end variables on w_subjectdef_ch.create call super::create end on on w_subjectdef_ch.destroy call super::destroy end on event close;CloseWithReturn(This,s_rt_subject) end event event open;call super::open;String ls_subid ls_subid = Message.StringParm IF ls_subid <> '' THEN sle_ch.Text = ls_subid THIS.TriggerEvent("dw_filter") END IF end event event dw_filter;String obj_expr = '' IF Trim(sle_ch.Text) <> '' THEN IF Pos(Trim(sle_ch.Text),'%') = 0 THEN obj_expr = obj_expr+'( subid LIKE "%'+Trim(sle_ch.Text)+'%" )' obj_expr = obj_expr+' or ( name LIKE "%'+Trim(sle_ch.Text)+'%" )' ELSE obj_expr = obj_expr+'( subid LIKE "'+Trim(sle_ch.Text)+'" )' obj_expr = obj_expr+' or ( 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 ue_before_open;call super::ue_before_open;if_ue_sort = TRUE end event type cb_func from w_publ_choice`cb_func within w_subjectdef_ch end type type cb_exit from w_publ_choice`cb_exit within w_subjectdef_ch end type type sle_ch from w_publ_choice`sle_ch within w_subjectdef_ch integer x = 571 integer width = 1065 end type type dw_ch from w_publ_choice`dw_ch within w_subjectdef_ch integer width = 3493 integer height = 1880 string dataobject = "dw_subject_ch" end type type st_1 from w_publ_choice`st_1 within w_subjectdef_ch integer width = 535 string text = "科目代码|科目名称含" end type type cb_retrieve from w_publ_choice`cb_retrieve within w_subjectdef_ch end type event cb_retrieve::clicked;dw_ch.retrieve(sys_accsetid) end event type cb_choice from w_publ_choice`cb_choice within w_subjectdef_ch end type event cb_choice::clicked;call super::clicked;Long ll_row Int li_detailflag ll_row = dw_ch.GetRow() IF ll_row <= 0 THEN MessageBox('系统提示','请选择目标科目') RETURN END IF li_detailflag = dw_ch.Object.detailflag[ll_row] IF li_detailflag = 0 THEN MessageBox(publ_operator,'明细科目,不能选择') RETURN END IF s_rt_subject.subid = dw_ch.Object.subid[ll_row] s_rt_subject.Name = dw_ch.Object.Name[ll_row] s_rt_subject.dcflag = dw_ch.Object.dcflag[ll_row] s_rt_subject.detailflag = dw_ch.Object.detailflag[ll_row] s_rt_subject.hswb = dw_ch.Object.hswb[ll_row] s_rt_subject.moneyid = dw_ch.Object.moneyid[ll_row] s_rt_subject.hsqty = dw_ch.Object.hsqty[ll_row] s_rt_subject.hsdept = dw_ch.Object.hsdept[ll_row] s_rt_subject.hsemp =dw_ch.Object.hsemp[ll_row] s_rt_subject.hsitem = dw_ch.Object.hsitem[ll_row] s_rt_subject.hscust = dw_ch.Object.hscust[ll_row] s_rt_subject.hsspt = dw_ch.Object.hsspt[ll_row] s_rt_subject.hstrader = dw_ch.Object.hstrader[ll_row] Close(PARENT) end event type ln_bar from w_publ_choice`ln_bar within w_subjectdef_ch end type type ln_bar2 from w_publ_choice`ln_bar2 within w_subjectdef_ch end type type r_bar from w_publ_choice`r_bar within w_subjectdef_ch end type type ln_1 from w_publ_choice`ln_1 within w_subjectdef_ch end type type ln_2 from w_publ_choice`ln_2 within w_subjectdef_ch end type