Exemple #1
0
        private List <SupplierCompanyDiscount> GetMergedItemDiscountList()
        {
            try
            {
                List <SupplierCompanyDiscount> allItemDiscountList    = applicationFacade.GetAllCompanyItemDiscountByCompanyIDForSupplier(retSupplierCopanyDiscount.CompanyID);
                List <SupplierCompanyDiscount> mappedItemDiscountList = this.retSupplierCopanyDiscount.SupplierItemDiscountMapping;

                if (mappedItemDiscountList != null)
                {
                    allItemDiscountList.RemoveAll(x => mappedItemDiscountList.Any(y => y.ItemID == x.ItemID));
                    allItemDiscountList.AddRange(mappedItemDiscountList);
                }

                return(allItemDiscountList.OrderBy(x => x.ItemName).ToList());
            }
            catch (Exception)
            {
                throw;
            }
        }