public ActionResult SaveConfig(SiteConfigInfo configInfo) { var config= SiteConfig.GetSetting(); config.SiteName = configInfo.SiteName; config.MetaKeywords = configInfo.MetaKeywords; config.MetaDescription = configInfo.MetaDescription; config.FooterHtml = configInfo.FooterHtml; SiteConfig.UpdateSetting(); SuccessNotification("保存成功"); return RedirectToAction("site"); }
/// <summary> /// 单例初始化 /// </summary> public static void LoadSetting() { if (_setting == null) { lock (lockHelper) { if (_setting == null) { object obj = Jqpress.Framework.Xml.SerializationHelper.Load(typeof(SiteConfigInfo), BlogConfigPath); if (obj == null) { _setting= new SiteConfigInfo(); } _setting= (SiteConfigInfo)obj; } } } }
public AdminPage() { CheckLoginAndPermission(); setting = Jqpress.Core.Configuration.SiteConfig.GetSetting(); }