示例#1
0
 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");
 }
示例#2
0
        /// <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;
                    }
                }
            }
        }
示例#3
0
 public AdminPage()
 {
     CheckLoginAndPermission();
     setting = Jqpress.Core.Configuration.SiteConfig.GetSetting();
 }