public List <ClientApplication> getAllApplications() { using (var CArepo = new ClientApplicationRepository()) { return((from x in CArepo.GetAll() select x).ToList()); } }
public List <ClientApplication> getDeclinedApplications() { using (var CArepo = new ClientApplicationRepository()) { return((from x in CArepo.GetAll() where x.status == "Declined" select x).ToList()); } }
public List <ClientApplication> getIncompleteApplications() { using (var CArepo = new ClientApplicationRepository()) { return((from x in CArepo.GetAll() where x.status == "Awaiting outstanding supporting documents" select x).ToList()); } }
public List <ClientApplicationBeneficiary> getBeneficiariesByAppID(int appID) { var BenefitiaryArepo = new ClientApplicationBeneficiaryRepository(); var ClientArepo = new ClientApplicationRepository(); ClientApplication client = ClientArepo.Find(x => x.applicationID == appID).SingleOrDefault(); // find client List <ClientApplicationBeneficiary> cab = new List <ClientApplicationBeneficiary>(); cab = (from cl in ClientArepo.GetAll() join ben in BenefitiaryArepo.GetAll() on cl.IDNumber equals ben.IDNumber where ben.IDNumber == client.IDNumber select ben).ToList(); return(cab); }
public List <ClientApplicationBeneficiary> getBeneficiariesByClientID(string ID) { var BenefitiaryArepo = new ClientApplicationBeneficiaryRepository(); var ClientArepo = new ClientApplicationRepository(); List <ClientApplicationBeneficiary> cab = new List <ClientApplicationBeneficiary>(); cab = (from cl in ClientArepo.GetAll() join ben in BenefitiaryArepo.GetAll() on cl.IDNumber equals ben.IDNumber where ben.IDNumber == ID select ben).ToList(); return(cab); }