public PartialViewResult EditSubGoal(AssessmentSubGoalPrimaryKey assessmentSubGoalPrimaryKey)
        {
            var subGoal   = assessmentSubGoalPrimaryKey.EntityObject;
            var viewModel = new EditSubGoalViewModel(subGoal);

            return(ViewEditSubGoal(viewModel));
        }
        public ActionResult EditSubGoal(AssessmentSubGoalPrimaryKey assessmentSubGoalPrimaryKey, EditSubGoalViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(ViewEditSubGoal(viewModel));
            }
            var subGoal = assessmentSubGoalPrimaryKey.EntityObject;

            viewModel.UpdateModel(subGoal, CurrentFirmaSession);
            return(new ModalDialogFormJsonResult());
        }
        private PartialViewResult ViewEditSubGoal(EditSubGoalViewModel viewModel)
        {
            var viewData = new EditSubGoalViewData();

            return(RazorPartialView <EditSubGoal, EditSubGoalViewData, EditSubGoalViewModel>(viewData, viewModel));
        }