Пример #1
0
        public ActionResult Administration(SettingsEditModel model)
        {
            try
            {
                SetSettings(model);
                model.OperationResult = "Settings successfully saved";
            }
            catch (Exception)
            {
                model.OperationResult = "Settings was not saved";
            }

            model.PageTitle = "Administration";

            return View("Administration", model);
        }
Пример #2
0
 private void SetSettings(SettingsEditModel model)
 {
     _settingRepository.BlogName = model.BlogName;
     _settingRepository.AboutPageText = model.AboutPageText;
     _settingRepository.CommentListPageSize = model.CommentListPageSize;
     _settingRepository.ListPageSize = model.ListPageSize;
     _settingRepository.MetaKeywords = model.MetaKeywords;
     _settingRepository.MetaDescription = model.MetaDescription;
 }
Пример #3
0
 private SettingsEditModel GetSettingsModel()
 {
     var model = new SettingsEditModel
                     {
                         BlogName = _settingRepository.BlogName,
                         AboutPageText = _settingRepository.AboutPageText,
                         CommentListPageSize = _settingRepository.CommentListPageSize,
                         ListPageSize = _settingRepository.ListPageSize,
                         MetaKeywords = _settingRepository.MetaKeywords,
                         MetaDescription = _settingRepository.MetaDescription
                     };
     return model;
 }