public override decimal CalculateTotalPrice()
 {
     _giftWrapPrice = _giftWrappingPriceCalculationService.Calculate(ClientPurchaseInfo.GiftWrapping);
     return(OrderPurchaseStrategy.CalculateTotalPrice() + _giftWrapPrice);
 }
 public override void ValidateOrderSummary(decimal totalPrice)
 {
     OrderPurchaseStrategy.ValidateOrderSummary(totalPrice);
     PlaceOrderPage.Instance.Validate().GiftWrapPrice(_giftWrapPrice.ToString());
 }
 public GiftOrderPurchaseStrategy(OrderPurchaseStrategy orderPurchaseStrategy, decimal itemsPrice, Data.ClientPurchaseInfo clientPurchaseInfo) : base(orderPurchaseStrategy, itemsPrice, clientPurchaseInfo)
 {
     _giftWrappingPriceCalculationService = new GiftWrappingPriceCalculationService();
 }
 public override void ValidateOrderSummary(decimal totalPrice)
 {
     OrderPurchaseStrategy.ValidateOrderSummary(totalPrice);
     PlaceOrderPage.Instance.Validate().EstimatedTaxPrice("0.00");
 }
 public NoTaxesOrderPurchaseStrategy(OrderPurchaseStrategy orderPurchaseStrategy, decimal itemsPrice, Data.ClientPurchaseInfo clientPurchaseInfo) : base(orderPurchaseStrategy, itemsPrice, clientPurchaseInfo)
 {
 }
Пример #6
0
 public OrderPurchaseStrategyDecorator(OrderPurchaseStrategy orderPurchaseStrategy, decimal itemsPrice, Data.ClientPurchaseInfo clientPurchaseInfo)
 {
     OrderPurchaseStrategy = orderPurchaseStrategy;
     ItemsPrice            = itemsPrice;
     ClientPurchaseInfo    = clientPurchaseInfo;
 }
 public VatTaxOrderPurchaseStrategy(OrderPurchaseStrategy orderPurchaseStrategy, decimal itemsPrice, Data.ClientPurchaseInfo clientPurchaseInfo) : base(orderPurchaseStrategy, itemsPrice, clientPurchaseInfo)
 {
     _vatTaxCalculationService = new VatTaxCalculationService();
 }