public ActionResult Index(SettingsViewModel model) { if (!ModelState.IsValid) { return View(new SettingsViewModel(Settings.ActiveSettings)); } Settings.ActiveSettings = model.ToSettingModel(Settings.ActiveSettings); return RedirectToAction("Index"); }
public ActionResult Index(SettingsViewModel model) { ViewBag.Version = VersionUtil.GetFullVersionString(); if (!ModelState.IsValid) { return View(new SettingsViewModel(Settings.ActiveSettings)); } Settings.ActiveSettings = model.ToSettingModel(Settings.ActiveSettings); return RedirectToAction("Index"); }