public ActionResult EditSystemConfig() { User u = (User)Session[KeysUtils.SessionAdmin()]; if (u == null) { return(RedirectToAction("Index", "Home")); } else { return(View(SystemConf.GetSystemConf())); } }
public ActionResult EditSystemConfig(SystemConf conf) { User u = (User)Session[KeysUtils.SessionAdmin()]; if (u == null) { return(RedirectToAction("Index", "Home")); } else { if (ModelState.IsValid) { conf.save(); ViewBag.Status = true; ViewBag.Message = "Successfuly edited configuration"; } else { ViewBag.Message = "Invalid Request"; conf = SystemConf.GetSystemConf(); } return(View(conf)); } }