public static CustomScriptConfig ReadConfig(string fileName) { string fpath = Path.Combine(AtawAppContext.Current.BinPath, AtawApplicationConfig.REAL_PATH, "Script", fileName); return(XmlUtil.ReadFromFile <CustomScriptConfig>(fpath)); }
public static T PlugGet<T>(this string name) { // name = if (name.ToUpper().IndexOf(".XML") > 0) { name = name.ToUpper(); if (name.IndexOf("@") >= 0) { name = name.Replace(".XML", ""); string[] arr = name.Split('@'); string xml = arr[0]; AtawAppContext.Current.PageFlyweight.PageItems["XmlString"] = arr[1]; name = xml + ".XML"; } string path = Path.Combine(AtawAppContext.Current.BinPath, AtawApplicationConfig.REAL_PATH, name); object obj = XmlUtil.ReadFromFile(path, typeof(T)); return (T)obj; } else { return name.CodePlugIn<T>(); } }
private DataFormConfig ReadConfig(string fileName) { string fpath = Path.Combine(AtawAppContext.Current.BinPath, AtawApplicationConfig.REAL_PATH, "form", fileName); return(XmlUtil.ReadFromFile <DataFormConfig>(fpath)); }
public static DbCodeTableXml ReadConfig(string fileName) { string fpath = Path.Combine(AtawAppContext.Current.BinPath, AtawApplicationConfig.REAL_PATH, "CodeTable", fileName); return(XmlUtil.ReadFromFile <DbCodeTableXml>(fpath)); }
public static FileManagementConfig ReadConfig(string binPath) { string fpath = Path.Combine(binPath, AtawApplicationConfig.REAL_PATH, "FileManagementConfig.xml"); var _config = XmlUtil.ReadFromFile <FileManagementConfig>(fpath); return(MergeFileManagementConfig(_config)); }
public static IList <DbCodeTableXml> ReadConfigFromDir() { string fpath = Path.Combine(AtawAppContext.Current.BinPath, AtawApplicationConfig.REAL_PATH, "CodeTable"); string[] codeTableXmls = Directory.GetFiles(fpath, "*.xml", SearchOption.AllDirectories); IList <DbCodeTableXml> dbCodeTableXml = new List <DbCodeTableXml>(); foreach (var codeTableXml in codeTableXmls) { dbCodeTableXml.Add(XmlUtil.ReadFromFile <DbCodeTableXml>(codeTableXml)); } return(dbCodeTableXml); }
public static IList <FileManagementConfig> ReadConfigFromDir() { string fpath = Path.Combine(AtawAppContext.Current.BinPath, AtawApplicationConfig.REAL_PATH, "FileManagement"); FileUtil.ConfirmPath(fpath); string[] xmls = Directory.GetFiles(fpath, "*.xml", SearchOption.AllDirectories); IList <FileManagementConfig> dictXmlList = new List <FileManagementConfig>(); foreach (var dict in xmls) { dictXmlList.Add(XmlUtil.ReadFromFile <FileManagementConfig>(dict)); } return(dictXmlList); }
//附加基本的列(若配置没有) public void AddBaseColumns(string baseFormFileName) { try { string fpath = Path.Combine(AtawAppContext.Current.BinPath, AtawApplicationConfig.REAL_PATH, "form", baseFormFileName); var baseForm = XmlUtil.ReadFromFile <DataFormConfig>(fpath); foreach (var column in baseForm.Columns) { if (this.Columns.FirstOrDefault(n => n.Name.ToUpper() == column.Name.ToUpper()) == null) { this.Columns.Add(column); } } } catch { } }
public static IList <CustomScriptConfig> ReadConfigFromDir() { string fpath = Path.Combine(AtawAppContext.Current.BinPath, AtawApplicationConfig.REAL_PATH, "Script"); if (!Directory.Exists(fpath)) { Directory.CreateDirectory(fpath); } string[] scriptXmls = Directory.GetFiles(fpath, "*.xml", SearchOption.AllDirectories); IList <CustomScriptConfig> scriptList = new List <CustomScriptConfig>(); foreach (var scriptXml in scriptXmls) { scriptList.Add(XmlUtil.ReadFromFile <CustomScriptConfig>(scriptXml)); } return(scriptList); }
public static SiteFunConfig ReadConfig(string binPath) { string fpath = Path.Combine(binPath, AtawApplicationConfig.REAL_PATH, "Fun.xml"); return(XmlUtil.ReadFromFile <SiteFunConfig>(fpath)); }
public static T XmlConfig<T>(this string fileName) where T : XmlConfigBase, new() { string path = Path.Combine(AtawAppContext.Current.BinPath, AtawApplicationConfig.REAL_PATH, fileName); return XmlUtil.ReadFromFile<T>(path); }
public static AtawConfigInfo ReadConfig(string binPath) { string fpath = Path.Combine(binPath, AtawApplicationConfig.REAL_PATH, "ProductConfig.xml"); return(XmlUtil.ReadFromFile <AtawConfigInfo>(fpath)); }
public static DocViewerConfig ReadConfig(string binPath) { string fpath = Path.Combine(binPath, AtawApplicationConfig.REAL_PATH, "DocViwer.xml"); return(XmlUtil.ReadFromFile <DocViewerConfig>(fpath)); }
public static ThemeListConfig ReadConfig(string binPath) { string fpath = Path.Combine(binPath, AtawApplicationConfig.REAL_PATH, "ThemeList.xml"); return(XmlUtil.ReadFromFile <ThemeListConfig>(fpath)); }