public ActionResult Amend(AmendmentsViewModel amendmentViewModel /*Int32 projectVersionId, String year2*/)
        {
            /* Get Current Amendment Status
             * Does project need to be copied?
             * Amend Project
             * Check if Previous Active Amendment needs to be changed to inactive
             * Return to details page
             */
            //ProjectAmendments amendment = new ProjectAmendments();
            //amendment = amendmentViewModel.ProjectAmendments;
            //if (amendment.RequiresProjectCopy(_projectRepository.GetProjectAmendmentStatus((Int32)amendment.ProjectVersionId)))
            //{
            //    amendment.LocationMapPath = DRCOGConfig.GetConfig().LocationMapPath;
            //    amendment.PreviousProjectVersionId = (Int32)amendment.ProjectVersionId;
            //    amendment.ProjectVersionId = _projectRepository.CopyProject(amendment.PreviousProjectVersionId);
            //}
            //amendment = amendment.AmendProject();

            //_projectRepository.UpdateProjectAmendmentStatus(amendment);
            //if (amendment.RequireVersionStatusUpdate())
            //{
            //    _projectRepository.UpdateProjectVersionStatusId((Int32)amendment.PreviousProjectVersionId, amendment.VersionStatusId);
            //}

            throw new NotImplementedException();

            //ProjectAmendments amendment = amendmentViewModel.ProjectAmendments;
            //amendment.LocationMapPath = DRCOGConfig.GetConfig().LocationMapPath;
            //IAmendmentStrategy strategy = new DRCOG.TIP.Services.AmendmentStrategy(RtpProjectRepository, amendment).PickStrategy();
            //int projectVersionId = strategy.Amend();

            //return RedirectToAction("Details", new { controller = "Project", guid = projectVersionId });
            //return RedirectToAction("Details", new { controller = "Project", guid = amendment.ProjectVersionId });
        }
        public AmendmentsViewModel GetAmendmentsViewModel(int projectVersionId, string tipYear)
        {
            var result = new AmendmentsViewModel();

            // get project summary info
            result.InfoModel = GetProjectInfo(projectVersionId, tipYear);
            result.RtpSummary = GetProjectSummary(projectVersionId, tipYear);

            RTPSearchModel search = new RTPSearchModel()
            {
                ProjectId = (Int32)result.RtpSummary.ProjectId
            };
            result.AmendmentList = GetProjectAmendments(search);

            return result;
        }