Пример #1
0
        private void createRule(int percent, List <Product> productList, StatusProduct status)
        {
            var rule = new DiscountRule(percent, productList, status);

            this.cost += rule.discount();
            this.rules.Add(rule);
        }
 public DiscountRule(int discountPersent, List <Product> items, StatusProduct status)
 {
     this.statusProduct   = status;
     this.discountPersent = discountPersent;
     this.items           = items;
 }