Ejemplo n.º 1
0
        public ContactsViewData(Person currentPerson, ProjectUpdateBatch projectUpdateBatch, UpdateStatus updateStatus, EditPeopleViewData editPeopleViewData, ContactsValidationResult organizationsValidationResult, ProjectPeopleDetailViewData projectPeopleDetailViewData) : base(
                currentPerson, projectUpdateBatch, updateStatus, organizationsValidationResult.GetWarningMessages(), ProjectUpdateSection.Contacts.ProjectUpdateSectionDisplayName)
        {
            EditPeopleViewData          = editPeopleViewData;
            ProjectPeopleDetailViewData = projectPeopleDetailViewData;
            SectionCommentsViewData     =
                new SectionCommentsViewData(projectUpdateBatch.ContactsComment, projectUpdateBatch.IsReturned);
            RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshContacts(projectUpdateBatch.Project));

            DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffContacts(projectUpdateBatch.Project));
        }
Ejemplo n.º 2
0
        private PartialViewResult ViewEditPeople(EditPeopleViewModel viewModel, Project project)
        {
            var allPeople = HttpRequestStorage.DatabaseEntities.People.GetActivePeople();

            if (!allPeople.Contains(CurrentPerson))
            {
                allPeople.Add(CurrentPerson);
            }

            var allRelationshipTypes = ProjectPersonRelationshipType.All;

            var viewData = new EditPeopleViewData(allPeople, allRelationshipTypes, CurrentPerson);

            return(RazorPartialView <EditPeople, EditPeopleViewData, EditPeopleViewModel>(viewData, viewModel));
        }
Ejemplo n.º 3
0
 public ContactsViewData(Person currentPerson,
                         Models.Project project,
                         ProposalSectionsStatus proposalSectionsStatus, EditPeopleViewData editPeopleViewData) : base(currentPerson, project, ProjectCreateSection.Contacts.ProjectCreateSectionDisplayName, proposalSectionsStatus)
 {
     EditPeopleViewData = editPeopleViewData;
 }