$PBExportHeader$w_bom_bill_ch.srw forward global type w_bom_bill_ch from w_publ_choice end type end forward global type w_bom_bill_ch from w_publ_choice string title = "物料清单工作表选择" end type global w_bom_bill_ch w_bom_bill_ch type variables s_cmpl_modle_ch INS_RT_STRU end variables on w_bom_bill_ch.create call super::create end on on w_bom_bill_ch.destroy call super::destroy end on event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU) end event event dw_filter;call super::dw_filter;string obj_expr='' if trim(sle_ch.text)<>'' then IF POS(trim(sle_ch.text),'%')=0 THEN obj_expr=obj_expr+'( modlename LIKE "%'+trim(sle_ch.text)+'%" )' ELSE obj_expr=obj_expr+'( modlename 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;INS_RT_STRU.modleid = 0 end event type cb_func from w_publ_choice`cb_func within w_bom_bill_ch end type type cb_exit from w_publ_choice`cb_exit within w_bom_bill_ch end type type sle_ch from w_publ_choice`sle_ch within w_bom_bill_ch end type type dw_ch from w_publ_choice`dw_ch within w_bom_bill_ch string dataobject = "dw_bom_bill_ch" end type type st_1 from w_publ_choice`st_1 within w_bom_bill_ch end type type cb_retrieve from w_publ_choice`cb_retrieve within w_bom_bill_ch end type type cb_choice from w_publ_choice`cb_choice within w_bom_bill_ch end type event cb_choice::clicked;call super::clicked;Long LS_ROW LS_ROW = dw_CH.GetRow() IF LS_ROW <= 0 THEN MessageBox('系统提示','请先选择目标行!',StopSign!) RETURN END IF INS_RT_STRU.modleid = dw_CH.Object.modleid[LS_ROW] INS_RT_STRU.modlename = dw_CH.Object.modlename[LS_ROW] //Long ll_printid //String ll_parmName //String ll_displayName //Decimal ll_defaultValue //Long ll_if_useformula //String ll_formula //Long ll_if_from_mtrl //Long ll_mtrlid //String ll_mtrl_pro //Long ll_if_from_product //String ll_product_pro //String ll_mtrlcode //String ll_mtrlname // //declare cur1 cursor for // select // printid, // parmName, // displayName, // defaultValue, // if_useformula, // formula, // if_from_mtrl, // u_cmpl_modleMx.mtrlid, // mtrl_pro, // if_from_product, // product_pro, // isnull(u_mtrldef.mtrlcode, '') as mtrlcode, // isnull(u_mtrldef.mtrlname, '') as mtrlname // from u_cmpl_modleMx LEFT outer JOIN u_mtrldef ON u_cmpl_modleMx.mtrlid = u_mtrldef.mtrlid // Where modleid = :INS_RT_STRU.modleid order by printid; // //open cur1; //fetch cur1 into // :ll_printid, // :ll_parmName, // :ll_displayName, // :ll_defaultValue, // :ll_if_useformula, // :ll_formula, // :ll_if_from_mtrl, // :ll_mtrlid, // :ll_mtrl_pro, // :ll_if_from_product, // :ll_product_pro, // :ll_mtrlcode, // :ll_mtrlname; // //Long ll_cnt = 0 //DO WHILE sqlca.SQLCode = 0 // ll_cnt++ // INS_RT_STRU.printid[ll_cnt] = ll_printid // INS_RT_STRU.parmName[ll_cnt] = ll_parmName // INS_RT_STRU.DisplayName[ll_cnt] = ll_displayName // INS_RT_STRU.defaultValue[ll_cnt] = ll_defaultValue // INS_RT_STRU.if_useformula[ll_cnt] = ll_if_useformula // INS_RT_STRU.formula[ll_cnt] = ll_formula // INS_RT_STRU.if_from_mtrl[ll_cnt] = ll_if_from_mtrl // INS_RT_STRU.mtrlid[ll_cnt] = ll_mtrlid // INS_RT_STRU.mtrl_pro[ll_cnt] = ll_mtrl_pro // INS_RT_STRU.if_from_product[ll_cnt] = ll_if_from_product // INS_RT_STRU.product_pro[ll_cnt] = ll_product_pro // INS_RT_STRU.mtrlcode[ll_cnt] = ll_mtrlcode // INS_RT_STRU.mtrlname[ll_cnt] = ll_mtrlname // fetch cur1 into // :ll_printid, // :ll_parmName, // :ll_displayName, // :ll_defaultValue, // :ll_if_useformula, // :ll_formula, // :ll_if_from_mtrl, // :ll_mtrlid, // :ll_mtrl_pro, // :ll_if_from_product, // :ll_product_pro, // :ll_mtrlcode, // :ll_mtrlname; // //LOOP //close cur1; Close(PARENT) end event type ln_bar from w_publ_choice`ln_bar within w_bom_bill_ch end type type ln_bar2 from w_publ_choice`ln_bar2 within w_bom_bill_ch end type type r_bar from w_publ_choice`r_bar within w_bom_bill_ch end type type ln_1 from w_publ_choice`ln_1 within w_bom_bill_ch end type type ln_2 from w_publ_choice`ln_2 within w_bom_bill_ch end type