public ActionResult Edit(Setting setting) { if (ModelState.IsValid) { _settingBusiness.Update(setting); _settingBusiness.Save(); return(RedirectToAction("Index")); } return(View(setting)); }
public virtual JsonResult SubmitChange(Setting model) { if (model.IsNotNull().And(ModelState.IsValid)) { return(Json(_settingBusiness.Update(model), JsonRequestBehavior.AllowGet)); } return(Json(new ActionResponse <int> { Message = LocalMessage.BadRequest }, JsonRequestBehavior.AllowGet)); }