Esempio n. 1
0
        public string GetProjectOrganizationNamesByType(string organizationTypeName)
        {
            var organizationsInType = ProjectOrganizations.Where(x => x.OrganizationRelationshipType.OrganizationRelationshipTypeName == organizationTypeName).ToList();
            var organizationNames   = organizationsInType.Select(x => x.Organization.GetDisplayName()).ToList();

            return($"{string.Join(", ", organizationNames)}");
        }
Esempio n. 2
0
 public IEnumerable <Organization> GetOrganizationsToReportInAccomplishments()
 {
     if (MultiTenantHelpers.GetRelationshipTypeToReportInAccomplishmentsDashboard() == null)
     {
         // Default is Funding Organizations
         var organizations = ProjectGrantAllocationExpenditures.Select(x => x.GrantAllocation.BottommostOrganization)
                             .Union(ProjectGrantAllocationRequests
                                    .Select(x => x.GrantAllocation.BottommostOrganization))
                             .Distinct(new HavePrimaryKeyComparer <Organization>());
         return(organizations);
     }
     else
     {
         return(ProjectOrganizations.Where(x => x.RelationshipType.ReportInAccomplishmentsDashboard)
                .Select(x => x.Organization).ToList());
     }
 }
Esempio n. 3
0
        public List <ReportTemplateProjectOrganizationModel> GetProjectOrganizationsByType(string organizationTypeName)
        {
            var organizationsInType = ProjectOrganizations.Where(x => x.OrganizationRelationshipType.OrganizationRelationshipTypeName == organizationTypeName).ToList();

            return(organizationsInType.Select(x => new ReportTemplateProjectOrganizationModel(x)).ToList());
        }