Exemple #1
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());
        }
Exemple #2
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());
        }