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