Beispiel #1
0
        /// <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));
        }
Beispiel #2
0
        /// <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));
        }