Example #1
0
        public ActionResult Edit(CreateEditViewModel model)
        {
            var region = regionProvider.GetRegion(model.Id);

            Mapper.DynamicMap(model, region);
            regionProvider.UpdateRegion(region);

            var jsonViewModel = new AjaxViewModel(true, model, null);

            return(Json(jsonViewModel));
        }
Example #2
0
        public ActionResult Edit(CreateEditViewModel model)
        {
            var region = new DataAccess.Region();

            mapper.Map(model, region);
            try
            {
                regionProvider.UpdateRegion(region);
            }
            catch (Exception ex)
            {
                return(HandleException(ex));
            }
            var jsonViewModel = new AjaxViewModel(true, model, null);

            return(Json(jsonViewModel));
        }