Пример #1
0
        /// <summary>创建系统配置</summary>
        public static void CreateSysConfig()
        {
            wapp.AppList.SaveConfigPath = wapp.AppList.AppBasePath + wapp.AppList.AppFilesDirName + "\\";
            FileSys.NewDir(wapp.AppList.SaveConfigPath);
            wapp.AppList.LogSavePath = wapp.AppList.AppBasePath + wapp.AppList.SaveLogDirName + "\\";
            FileSys.NewDir(wapp.AppList.LogSavePath);
            _UserLoginTable  = wapp.AppList.GetConfigDataTable(wapp.AppList.UserLoginTableName);
            _UserConifgTable = wapp.AppList.GetConfigDataTable(wapp.AppList.UserConifgTableName);
            _SystemInfo      = wapp.AppList.GetConfigDataTable(wapp.AppList.SystemInfoName);
            string spath = wapp.AppList.SaveConfigPath + _SystemInfo.TableName + ".xml";

            if (File.Exists(spath))
            {
                File.Delete(spath);
            }
            DataRow newRow = _SystemInfo.NewRow();

            newRow["SystemName"]    = SystemName;
            newRow["SystemTitle"]   = wapp.AppList.SystemShowName;
            newRow["SystemVers"]    = SystemVers;
            newRow["SystemVersion"] = SystemVersion;
            newRow["SystemVerNum"]  = SystemVerNum;
            newRow["PublishDate"]   = SystemPublishDate;
            newRow["SystemInfo"]    = wapp.AppList.SystemShowName;
            newRow["CreateDate"]    = SystemCreateDate;
            _SystemInfo.Rows.Add(newRow);
            _SystemInfo.WriteXml(spath, XmlWriteMode.WriteSchema);
        }