$PBExportHeader$w_subjectdef_ch_p.srw forward global type w_subjectdef_ch_p from w_publ_choice end type end forward global type w_subjectdef_ch_p from w_publ_choice integer width = 2811 integer height = 2280 string title = "科目选择" long backcolor = 83162356 end type global w_subjectdef_ch_p w_subjectdef_ch_p type variables s_edit_index_tran s_sub_open String rst_subidstr end variables on w_subjectdef_ch_p.create call super::create end on on w_subjectdef_ch_p.destroy call super::destroy end on event close;CloseWithReturn(THIS,rst_subidstr) end event event open;THIS.TriggerEvent('ue_before_open') wf_movetocenter() s_sub_open = Message.PowerObjectParm if_ue_sort = TRUE dw_CH.SetTransObject (s_sub_open.sqltransaction) cb_retrieve.TriggerEvent(Clicked!) 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_p end type type cb_exit from w_publ_choice`cb_exit within w_subjectdef_ch_p end type type sle_ch from w_publ_choice`sle_ch within w_subjectdef_ch_p integer x = 571 integer width = 1065 end type type dw_ch from w_publ_choice`dw_ch within w_subjectdef_ch_p integer width = 2789 integer height = 1880 string dataobject = "dw_subject_ch_p" end type type st_1 from w_publ_choice`st_1 within w_subjectdef_ch_p integer width = 535 string text = "科目代码|科目名称含" end type type cb_retrieve from w_publ_choice`cb_retrieve within w_subjectdef_ch_p end type event cb_retrieve::clicked;dw_ch.Retrieve(s_sub_open.b_long) String ls_subid_array[],ls_subid Long ll_array,i,j ls_subid = s_sub_open.b_string IF ls_subid <> '' THEN DO WHILE ls_subid <> '' IF Pos(ls_subid,'+') = 0 THEN ll_array++ ls_subid_array[ll_array] = ls_subid ls_subid = '' ELSE ll_array++ ls_subid_array[ll_array] = Left(ls_subid,Pos(ls_subid,'+') - 1) ls_subid = Mid(ls_subid,Pos(ls_subid,'+') + 1) END IF LOOP END IF FOR i = 1 TO ll_array FOR j = 1 TO dw_ch.RowCount() IF ls_subid_array[i] = dw_ch.Object.subid[j] THEN dw_ch.Object.ch[j] = 1 END IF NEXT NEXT end event type cb_choice from w_publ_choice`cb_choice within w_subjectdef_ch_p end type event cb_choice::clicked;call super::clicked;Long i,ll_cnt dw_ch.SetFilter('') dw_ch.Filter() FOR i = 1 TO dw_ch.RowCount() IF dw_ch.Object.ch[i] = 1 THEN ll_cnt++ rst_subidstr += dw_ch.Object.subid[i] + '+' END IF NEXT IF ll_cnt = 0 THEN MessageBox('系统提示','请选择目标科目') RETURN END IF rst_subidstr = Left(rst_subidstr,Len(rst_subidstr) - 1) CLOSE(PARENT) end event type ln_bar from w_publ_choice`ln_bar within w_subjectdef_ch_p end type type ln_bar2 from w_publ_choice`ln_bar2 within w_subjectdef_ch_p end type type r_bar from w_publ_choice`r_bar within w_subjectdef_ch_p end type type ln_1 from w_publ_choice`ln_1 within w_subjectdef_ch_p end type type ln_2 from w_publ_choice`ln_2 within w_subjectdef_ch_p end type