Пример #1
0
 public void ApplyDiscount(DatedDiscount datedDiscount)
 {
     if (datedDiscount.IsValidOn(OrderDate))
         foreach (OrderedProduct orderedProduct in Products)
         {
             orderedProduct.ApplyDiscount(datedDiscount);
         }
 }
Пример #2
0
 internal void ApplyDiscount(DatedDiscount datedDiscount)
 {
     if (datedDiscount.DoesApplyTo(_product))
         _appliedDiscount = new AppliedDiscount(datedDiscount.DiscountPercent, _appliedDiscount);
 }