$PBExportHeader$f_get_obj_visible.srf global type f_get_obj_visible from function_object end type forward prototypes global function integer f_get_obj_value (string arg_dwname, ref datastore arg_ds, ref string arg_msg) global function string f_get_obj_visible (datawindow arg_dw, string arg_propertystr, string arg_property, string arg_objname) global function string f_get_obj_visible (string arg_dwobj, string arg_propertystr, string arg_property, string arg_objname) end prototypes global function integer f_get_obj_value (string arg_dwname, ref datastore arg_ds, ref string arg_msg);////取隐藏字段定义 Int rslt = 1 IF arg_dwname = '' THEN RETURN 0 datawindow dw dw = create datawindow dw.dataobject = arg_dwname //设定dw的column String ls_object, ls_object_col, ls_object_txt, ls_object_txt_text String ls_mdfstr_visible, ls_mdfstr_x, ls_mdfstr_width, ls_mdfstr_alignment, ls_mdfstr_DftValue String ls_mdfstr_text String ls_mdfstr_height,ls_mdfstr_y,ls_mdfstr_Taborder string ls_AllowVersion String ls_mdfstr_tmp, ls_mdfstr_value String ls_dwname,ls_dbname,ls_dftvalue long ll_objvisible Long ll_alignment,ll_taborder Long ll_x, ll_y,ll_width, ll_height,ll_titlex,ll_titley string ls_objtype, ls_coltype String ls_modify String ls_dwobjectstr,ls_type Long li_start,li_tab_pos Boolean lb_def = True long ll_row ls_dwname = dw.DataObject ls_AllowVersion = Fill("0",sys_version_int - 1)+"1"+Fill("0",20 - sys_version_int) SELECT DwObjVisible, DwObjText, DwObjX, DwObjY, DwObjWidth, DwObjHeight, DwObjAlignment, DwObjTaborder, DwObjDftValue INTO :ls_mdfstr_visible,:ls_mdfstr_text, :ls_mdfstr_x,:ls_mdfstr_y,:ls_mdfstr_width,:ls_mdfstr_height,:ls_mdfstr_alignment,:ls_mdfstr_Taborder, :ls_mdfstr_DftValue FROM sys_dwnSyntax_sys WHERE AllowVersion = :ls_AllowVersion And DwName = :ls_dwname; IF sqlca.SQLCode <> 0 THEN lb_def = False END IF ls_dwobjectstr = dw.Describe("Datawindow.Objects") + "~t" li_start = 1 li_tab_pos = Pos(ls_dwobjectstr, "~t", li_start) DO WHILE li_tab_pos > 0 ls_object = Mid(ls_dwobjectstr, li_start, (li_tab_pos - li_start) ) IF Pos(ls_object,'_t') > 0 THEN ls_object_col = Mid(ls_dwobjectstr, li_start, (li_tab_pos - li_start) - 2) ls_object_txt = ls_object ls_type = Lower(Left(dw.Describe(ls_object_col+".Type"),4)) IF ls_type = 'comp' Or ls_type = 'colu' THEN // des_1 = This.Describe( ls_object_col + ".Name") ls_object_txt_text = dw.Describe(ls_object_txt+ ".Text") ls_dbname = dw.Describe( ls_object_col + ".dbname") ls_object_txt_text = f_strip( ls_object_txt_text) IF ls_object_txt_text <> "!" THEN //uf_get_value(ls_object_col,"visible",li_ColVisible,) IF Pos(ls_mdfstr_visible, ls_object_col + ".visible=") > 0 THEN //查解决方案 ls_mdfstr_tmp = mid(ls_mdfstr_visible , Pos(ls_mdfstr_visible, ls_object_col + ".visible=") + len(ls_object_col + ".visible=") ) IF Pos(ls_mdfstr_tmp,"~t") > 0 THEN ls_mdfstr_value = Left(ls_mdfstr_tmp, Pos(ls_mdfstr_tmp,"~t") - 1) ELSE ls_mdfstr_value = ls_mdfstr_tmp END IF //查帐套 IF ls_mdfstr_value = "1" THEN // END IF //查用户 IF ls_mdfstr_value = "1" THEN // END IF ll_objvisible = long(ls_mdfstr_value) else ll_objvisible = Long(dw.Describe(ls_object_col+ ".Visible")) END IF // ls_modify += des_1+ ".alignment = "+string(ll_alignment) + "~r" // ls_modify += des_1+ ".initial = '"+String(ls_initial) + "'~r" arg_ds.insertrow(0) arg_ds.object.objname[ll_row] = ls_object_col arg_ds.object.objtext[ll_row] = ls_object_txt_text arg_ds.object.objvisible[ll_row] = ll_objvisible arg_ds.object.objdftvalue[ll_row] = ls_dftvalue arg_ds.object.objx[ll_row] = ll_x arg_ds.object.objy[ll_row] = ll_y arg_ds.object.objwidth[ll_row] = ll_width arg_ds.object.objheight[ll_row] = ll_height arg_ds.object.objalignment[ll_row] = ll_alignment arg_ds.object.objtaborder[ll_row] = ll_taborder arg_ds.object.objtitlex[ll_row] = ll_titlex arg_ds.object.objtitley[ll_row] = ll_titley arg_ds.object.objtype[ll_row] = ls_objtype arg_ds.object.coltype[ll_row] = ls_coltype arg_ds.object.dbname[ll_row] = ls_dbname END IF END IF END IF li_start = li_tab_pos + 1 li_tab_pos = Pos(ls_dwobjectstr, "~t", li_start) LOOP RETURN rslt end function global function string f_get_obj_visible (datawindow arg_dw, string arg_propertystr, string arg_property, string arg_objname); Int rslt = 1 string ls_mdfstr string ls_property string ls_object_col string ls_mdfstr_tmp, ls_mdfstr_value ls_mdfstr = arg_propertystr ls_property = arg_property ls_object_col = arg_objname IF Pos(ls_mdfstr, ls_object_col + "."+ls_property+"=") > 0 THEN //查解决方案 ls_mdfstr_tmp = mid(ls_mdfstr , Pos(ls_mdfstr, ls_object_col + "."+ls_property+"=") + len(ls_object_col + "."+ls_property+"=") ) IF Pos(ls_mdfstr_tmp,"~t") > 0 THEN ls_mdfstr_value = Left(ls_mdfstr_tmp, Pos(ls_mdfstr_tmp,"~t") - 1) ELSE ls_mdfstr_value = ls_mdfstr_tmp END IF return ls_mdfstr_value else return arg_dw.Describe(ls_object_col+ "."+ls_property) END IF end function global function string f_get_obj_visible (string arg_dwobj, string arg_propertystr, string arg_property, string arg_objname); Int rslt = 1 string ls_mdfstr string ls_property string ls_object_col string ls_mdfstr_tmp, ls_mdfstr_value ls_mdfstr = arg_propertystr ls_property = arg_property ls_object_col = arg_objname IF Pos(ls_mdfstr, ls_object_col + "."+ls_property+"=") > 0 THEN //查解决方案 ls_mdfstr_tmp = mid(ls_mdfstr , Pos(ls_mdfstr, ls_object_col + "."+ls_property+"=") + len(ls_object_col + "."+ls_property+"=") ) IF Pos(ls_mdfstr_tmp,"~t") > 0 THEN ls_mdfstr_value = Left(ls_mdfstr_tmp, Pos(ls_mdfstr_tmp,"~t") - 1) ELSE ls_mdfstr_value = ls_mdfstr_tmp END IF return ls_mdfstr_value else // return arg_dw.Describe(ls_object_col+ "."+ls_property) // datastore ds // ds = create datastore // ds.dataobject = arg_dwobj ls_mdfstr_value = ds_obj_visible.Describe(ls_object_col+ "."+ls_property) // destroy ds return ls_mdfstr_value END IF end function