Пример #1
0
        public void SetProductCoupon(IProductPriceInfo product, IProductCoupon coupon)
        {
            if (product == null)
            {
                throw new ArgumentNullException(nameof(product));
            }
            if (coupon == null)
            {
                throw new ArgumentNullException(nameof(coupon));
            }

            var addCouponCommand = _productCouponFactory.CreateSetCouponCommand(product, coupon);

            _commandManager.ExecuteCommand(addCouponCommand);
        }
Пример #2
0
 public void SetProductCoupon(IProductCoupon coupon)
 {
     Coupon = coupon;
 }
Пример #3
0
 public SetCouponToProductCommand(IProductPriceInfo product, IProductCoupon newProductCoupon)
 {
     _product        = product;
     _newCoupon      = newProductCoupon;
     _previousCoupon = _product.Coupon;
 }
 public ICommand CreateSetCouponCommand(IProductPriceInfo product, IProductCoupon newCoupon)
 {
     return(new SetCouponToProductCommand(product, newCoupon));
 }