Ejemplo n.º 1
0
 /// <summary>
 /// 写入站点配置文件
 /// </summary>
 public App.Models.Sys.siteconfig saveConifg(App.Models.Sys.siteconfig model, string configFilePath)
 {
     lock (lockHelper)
     {
         SerializationHelper.Save(model, configFilePath);
     }
     return(model);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///  读取配置文件
 /// </summary>
 public App.Models.Sys.siteconfig loadConfig(string configFilePath)
 {
     App.Models.Sys.siteconfig model = CacheHelper.Get <App.Models.Sys.siteconfig>(ContextKeys.CACHE_SITE_CONFIG);
     if (model == null)
     {
         CacheHelper.Insert(ContextKeys.CACHE_SITE_CONFIG, dal.loadConfig(configFilePath), configFilePath);
         model = CacheHelper.Get <App.Models.Sys.siteconfig>(ContextKeys.CACHE_SITE_CONFIG);
     }
     return(model);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 读取客户端站点配置信息
 /// </summary>
 public App.Models.Sys.siteconfig loadConfig(string configFilePath, bool isClient)
 {
     App.Models.Sys.siteconfig model = CacheHelper.Get <App.Models.Sys.siteconfig>(ContextKeys.CACHE_SITE_CONFIG_CLIENT);
     if (model == null)
     {
         model = dal.loadConfig(configFilePath);
         model.templateskin = model.webpath + "templates/" + model.templateskin;
         CacheHelper.Insert(ContextKeys.CACHE_SITE_CONFIG_CLIENT, model, configFilePath);
     }
     return(model);
 }
Ejemplo n.º 4
0
 public UpLoad()
 {
     siteConfig = new App.BLL.SysConfigBLL().loadConfig(Utils.GetXmlMapPath("Configpath"));
 }
Ejemplo n.º 5
0
 /// <summary>
 ///  保存配置文件
 /// </summary>
 public App.Models.Sys.siteconfig saveConifg(App.Models.Sys.siteconfig model, string configFilePath)
 {
     return(dal.saveConifg(model, configFilePath));
 }