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