예제 #1
0
        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);
        }
예제 #2
0
        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);
        }