Пример #1
0
        public override double totalPrice()
        {
            double orignPirce = GoodsList.Sum(goods => goods.Num * goods.Price);
            double total      = 0;
            var    dicSort    = from objDic in fullReduce orderby objDic.Key ascending select objDic;

            foreach (KeyValuePair <double, double> item in dicSort)
            {
                if (orignPirce > item.Key)
                {
                    total -= item.Value;
                    break;
                }
            }
            return(total);
        }
Пример #2
0
        public override double totalPrice()
        {
            double orignPirce = GoodsList.Sum(goods => goods.Num * goods.Price);

            return(orignPirce * discount);
        }