コード例 #1
0
        public ActionResult CreateOrUpdate(CultureViewModel model)
        {
            if (!ValidateForm(model))
            {
                CreateNotification(ActionResultType.Failure);
                return(View("CreateOrUpdate", model));
            }
            var cultureParams = Mapper.Map <CultureParams>(model);
            var culture       = _cultureService.CreateOrUpdate(cultureParams);

            CreateNotification(ActionResultType.Success);

            return(RedirectToAction("Update", new { culture.Id }));
        }