public ActionResult Index(Setting setting) { JsonResultData data = new JsonResultData(ModelState); data.RunWithTry((resultData) => { SettingProvider.Update(setting, setting); resultData.AddMessage("The setting has been saved.".Localize()); }); return Json(data); }
public ActionResult Index(Setting setting) { JsonResultEntry resultEntry = new JsonResultEntry(ModelState); try { Kooboo.CMS.Account.Persistence.RepositoryFactory.SettingRepository.Update(setting, setting); } catch (Exception e) { resultEntry.AddException(e); } return Json(resultEntry); }