Example #1
0
      public OrganisationClients(Guid orgId, DbSet<ClientData> clients) {
        ProjectOrganisationData pod = ProjectOrganisationRepository.findOrg(orgId);
        locations_ = pod.Locations.Select(loc => loc.Id).ToArray();
        index_ = 0;
        
        clients_ = clients;

        enumerator_ = nextEnumerator();
      } // OrganisationClients
Example #2
0
    } // risks

    public IList<RiskMap> RiskMaps() {
      if (riskMaps_ == null) {
        var rmData = context.RiskMaps.ToList();
        foreach (var rm in rmData)
          rm.populate(orgrisks(false));

        riskMaps_ = rmData.Select(m => new RiskMap(m)).ToList();
      } // if not loaded ...
        
        
      if (!orgId_.HasValue)
        return riskMaps_.Where(rm => !rm.OwningOrganisation.HasValue).ToList();

      var po = new ProjectOrganisationRepository().Get(orgId_.Value);
      var maps = riskMaps_.Where(rm => po.RiskMaps.Contains(rm.Id) || rm.OwningOrganisation == orgId_).ToList();
      return maps;
    } // RiskMaps
 public static ProjectOrganisationData findOrg(Guid orgId) {
   ProjectOrganisationRepository repo = new ProjectOrganisationRepository();
   return repo.POD(orgId);
 } // findOrg
Example #4
0
    } // projectQuestions

    private IList<ReferralAgency> referralAgencies(ClientData clientData) {
      var poRepo = new ProjectOrganisationRepository();
      var projectOrg = projectOrganisation(clientData);
      var agencies = poRepo.FetchReferralAgencies(projectOrg.Details.Id);
      return agencies;
    } // referralAgencies