コード例 #1
0
        public ActionResult Save(AssumptionDataViewModel viewModel)
        {
            var request  = viewModel.MapTo <SaveAssumptionDataRequest>();
            var response = _assumptionDataService.SaveAssumptionData(request);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
コード例 #2
0
        public ActionResult Edit(AssumptionDataViewModel viewModel)
        {
            var request  = viewModel.MapTo <SaveAssumptionDataRequest>();
            var response = _assumptionDataService.SaveAssumptionData(request);

            TempData["IsSuccess"] = response.IsSuccess;
            TempData["Message"]   = response.Message;
            if (response.IsSuccess)
            {
                return(RedirectToAction("Index"));
            }
            return(View("Edit", viewModel));
        }