Esempio n. 1
0
        public static List <InsuranceCompany> GetByActiveDealsForLife()
        {
            List <LifeDeal>         dealsList     = LifeDeal.GetActiveDeals();
            List <InsuranceCompany> companiesList = new List <InsuranceCompany>();

            foreach (LifeDeal d in dealsList)
            {
                if (!companiesList.Contains(d.InsuranceCompany) && d.InsuranceCompany.IsActive)
                {
                    companiesList.Add(d.InsuranceCompany);
                }
            }
            return(companiesList.OrderBy(c => c.Code).ToList());
        }
Esempio n. 2
0
        public static List <InsuranceType> GetByCompanyWithLife(int companyID)
        {
            List <Deal>          dealList = Deal.GetByCompanyID(companyID);
            List <InsuranceType> insList  = new List <InsuranceType>();
            List <Brokerage>     brokList = Brokerage.GetByDeals(dealList);

            foreach (Brokerage b in brokList)
            {
                if (b.IsActive && !insList.Contains(b.InsuranceSubType.InsuranceType))
                {
                    insList.Add(b.InsuranceSubType.InsuranceType);
                }
            }
            List <LifeDeal> lst = LifeDeal.GetByInsuranceCompany(companyID);

            foreach (LifeDeal ld in lst)
            {
                if (!insList.Contains(ld.InsuranceSubType.InsuranceType))
                {
                    insList.Add(ld.InsuranceSubType.InsuranceType);
                }
            }
            return(insList.OrderBy(c => c.Code).ToList());
        }
Esempio n. 3
0
        public static List <InsuranceSubType> GetByInsuranceTypeAndCompanyForLife(int companyID)
        {
            List <LifeDeal> dealList = LifeDeal.GetByInsuranceCompany(companyID);

            return(dealList.Select(c => c.InsuranceSubType).OrderBy(c => c.Code).ToList());
        }