public ProjectOrganisation(ProjectOrganisationData projOrg) : base(projOrg.Details) { projects_ = projOrg.Projects != null ? projOrg.Projects : new List<ProjectData>(); staffCount_ = projOrg.Staff != null ? projOrg.Staff.Count() : 0; locationCount_ = projOrg.Locations != null ? projOrg.Locations.Count() : 0; referralAgencyCount_ = projOrg.ReferralAgencies != null ? projOrg.ReferralAgencies.Count() : 0; } // ProjectOrganisation
public Manager(StaffMemberData smd, ProjectOrganisationData pod) : base(smd, pod) { } // Manager
public Supervisor(StaffMemberData smd, ProjectOrganisationData pod) : base(smd, pod) { Projects = pod.Projects.Select(p => new Project(p)).OrderBy(p => p.Name).ToList(); Locations = pod.Locations.Select(l => new Location(l)).OrderBy(l => l.Name).ToList(); } // Supervisor
public Coordinator(StaffMemberData smd, ProjectOrganisationData pod) : base(smd, pod) { } // Coordinator
public Advisor(StaffMemberData smd, ProjectOrganisationData pod) : base(smd, pod) { Projects = pod.Projects.Where(p => smd.Projects().Contains(p.Id)).Select(p => new Project(p)).OrderBy(p => p.Name).ToList(); Locations = pod.Locations.Where(l => smd.Projects().Intersect(l.Projects()).Count() != 0).Select(l => new Location(l)).OrderBy(l => l.Name).ToList(); } // Advisor
public Staff(StaffMemberData smd, ProjectOrganisationData pod) { smd_ = smd; org_ = new Organisation(pod.Details); } // Advisor