Exemplo n.º 1
0
 public static List <Project> GetAllActiveProjectsWhereOrganizationReportsInAccomplishmentsDashboard(this Organization organization)
 {
     Check.Assert(MultiTenantHelpers.DisplayAccomplishmentDashboard());
     return(organization.GetAllAssociatedProjects()
            .GetActiveProjectsAndProposals(MultiTenantHelpers.ShowProposalsToThePublic())
            .Where(x => x.GetOrganizationsToReportInAccomplishments().Any(y => y == organization))
            .ToList());
 }
Exemplo n.º 2
0
 public static List <Project> GetProposalsVisibleToUser(this Organization organization, FirmaSession firmaSession
                                                        , Dictionary <int, List <FundingSource> > fundingSourceDictionary
                                                        , Dictionary <int, List <ProjectFundingSourceBudget> > projectFundingSourceBudgetsDictionary
                                                        , Dictionary <int, List <ProjectFundingSourceExpenditure> > projectFundingSourceExpendituresDictionary
                                                        , Dictionary <int, Project> projectDictionary)
 {
     return(organization.GetAllAssociatedProjects(fundingSourceDictionary, projectFundingSourceBudgetsDictionary, projectFundingSourceExpendituresDictionary, projectDictionary).GetProposalsVisibleToUser(firmaSession));
 }
Exemplo n.º 3
0
 public static List <Project> GetAllActiveProjects(this Organization organization
                                                   , Dictionary <int, List <FundingSource> > fundingSourceDictionary
                                                   , Dictionary <int, List <ProjectFundingSourceBudget> > projectFundingSourceBudgetsDictionary
                                                   , Dictionary <int, List <ProjectFundingSourceExpenditure> > projectFundingSourceExpendituresDictionary
                                                   , Dictionary <int, Project> projectDictionary)
 {
     return(organization.GetAllAssociatedProjects(fundingSourceDictionary, projectFundingSourceBudgetsDictionary, projectFundingSourceExpendituresDictionary, projectDictionary).GetActiveProjects());
 }
Exemplo n.º 4
0
        public static List <Project> GetAllActiveProjectsAndProposalsWhereOrganizationIsStewardOrPrimaryContact(this Organization organization, FirmaSession firmaSession)
        {
            var allActiveProjectsAndProposals = organization.GetAllAssociatedProjects().GetActiveProjectsAndProposals(firmaSession.CanViewProposals());

            if (MultiTenantHelpers.HasCanStewardProjectsOrganizationRelationship())
            {
                return(allActiveProjectsAndProposals.Where(x => x.GetCanStewardProjectsOrganization() == organization).ToList());
            }

            return(allActiveProjectsAndProposals.Where(x => x.GetPrimaryContactOrganization() == organization).ToList());
        }
Exemplo n.º 5
0
 public static List <Project> GetAllPendingProjects(this Organization organization, Person person)
 {
     return(organization.GetAllAssociatedProjects().GetPendingProjects(person.CanViewPendingProjects()));
 }
Exemplo n.º 6
0
 public static List <Project> GetProposalsVisibleToUser(this Organization organization, FirmaSession firmaSession)
 {
     return(organization.GetAllAssociatedProjects().GetProposalsVisibleToUser(firmaSession));
 }
Exemplo n.º 7
0
 public static List <Project> GetAllActiveProjects(this Organization organization)
 {
     return(organization.GetAllAssociatedProjects().GetActiveProjects());
 }
Exemplo n.º 8
0
 public static List <Project> GetAllActiveProjectsAndProposals(this Organization organization, FirmaSession firmaSession)
 {
     return(organization.GetAllAssociatedProjects().GetActiveProjectsAndProposals(firmaSession.CanViewProposals()));
 }