Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public DiscountRule(int discountPersent, List <Product> items, StatusProduct status)
 {
     this.statusProduct   = status;
     this.discountPersent = discountPersent;
     this.items           = items;
 }