public ActionResult EditLocation(FocusAreaPrimaryKey focusAreaPrimaryKey, EditLocationViewModel viewModel) { var focusArea = focusAreaPrimaryKey.EntityObject; if (!ModelState.IsValid) { var viewData = new EditLocationViewData(CurrentPerson, focusArea); return(RazorPartialView <EditLocationErrors, EditLocationViewData, EditLocationViewModel>(viewData, viewModel)); } viewModel.UpdateModel(focusArea); return(RedirectToAction(new SitkaRoute <FocusAreaController>(c => c.ApproveUploadGis(focusAreaPrimaryKey)))); }
public ActionResult EditLocation(OnlandVisualTrashAssessmentAreaPrimaryKey onlandVisualTrashAssessmentAreaPrimaryKey, EditLocationViewModel viewModel) { var onlandVisualTrashAssessmentArea = onlandVisualTrashAssessmentAreaPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEditLocation(onlandVisualTrashAssessmentArea, viewModel)); } viewModel.UpdateModel(onlandVisualTrashAssessmentArea); SetMessageForDisplay("Successfully updated OVTA Area location"); return(Redirect( SitkaRoute <OnlandVisualTrashAssessmentAreaController> .BuildUrlFromExpression(x => x.Detail(onlandVisualTrashAssessmentAreaPrimaryKey)))); }