示例#1
0
文件: DAL.cs 项目: EagleSmith/X
        /// <summary>导入模型</summary>
        /// <param name="xml"></param>
        /// <returns></returns>
        public static List <IDataTable> Import(String xml)
        {
            if (String.IsNullOrEmpty(xml))
            {
                return(null);
            }

            return(ModelHelper.FromXml(xml, CreateTable));
        }
示例#2
0
文件: DAL.cs 项目: eboxmaker/X
        /// <summary>导入模型文件</summary>
        /// <param name="xmlFile"></param>
        /// <returns></returns>
        public static List <IDataTable> ImportFrom(String xmlFile)
        {
            if (xmlFile.IsNullOrEmpty())
            {
                return(null);
            }

            xmlFile = xmlFile.GetFullPath();
            if (!File.Exists(xmlFile))
            {
                return(null);
            }

            return(ModelHelper.FromXml(File.ReadAllText(xmlFile), CreateTable));
        }