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