public static SiteConfig GetSiteConfig() { LogHelpers.LogHandler.Info("Start"); var result = SiteSettingsDAL.GetSiteConfig(); if (result.Code < 0) { LogHelpers.LogHandler.Error(result.ErrorMessage); return(new SiteConfig()); } return(result.Data); }
public ActionResult Setup() { if (!Utilities.IsLoggedUser()) { return(RedirectToAction("Login", "Home")); } var result = SiteSettingsDAL.GetSiteConfig(); if (result.Code < 0) { LogHelpers.LogHandler.Error(result.ErrorMessage); } return(View("Setup", result.Data)); }
public ActionResult Index(SiteConfig config) { if (!Utilities.IsLoggedUser()) { return(RedirectToAction("Login", "Home")); } LogHelpers.LogHandler.Info("Start."); if (config == null) { return(View(new SiteConfig())); } var result = SiteSettingsDAL.SaveSiteConfig(config); if (result.Code < 0) { LogHelpers.LogHandler.Error(result.ErrorMessage); ModelState.AddModelError("", result.ErrorMessage); } return(View(config)); }