public ActionResult Save(AssumptionDataViewModel viewModel) { var request = viewModel.MapTo <SaveAssumptionDataRequest>(); var response = _assumptionDataService.SaveAssumptionData(request); return(Json(response, JsonRequestBehavior.DenyGet)); }
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)); }