Exemple #1
0
        public Order CancelLineItem(string sku)
        {
            if (States.Count > 1)
            {
                throw new CannotCancelOrderProductItemException();
            }

            var product = OrderProducts.FirstOrDefault(x => x.Sku == sku);

            OrderProducts.Remove(product);
            CanceledOrderProducts.Add(product);

            TotalPrice        -= product.Price * product.Quantity;
            TotalPriceWithVat -= product.PriceWithVat * product.Quantity;
            TotalVat          -= product.Vat * product.Quantity;

            return(this);
        }
Exemple #2
0
 private void DeleteOrderCommand()
 {
     OrderProducts.Remove(ParameterOrder);
     RaisePropertyChangedEvent(nameof(OrderFillter));
     LogAddDeleteOrder();
 }