Пример #1
0
 public ActionResult Edit(Setting setting)
 {
     if (ModelState.IsValid)
     {
         _settingBusiness.Update(setting);
         _settingBusiness.Save();
         return(RedirectToAction("Index"));
     }
     return(View(setting));
 }
Пример #2
0
 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));
 }