Beispiel #1
0
        /// <summary>
        /// Removes all products from the cart
        /// </summary>
        public void RemoveAll()
        {
            if (!mIsSearching)
            {
                foreach (var item in CurrentCart)
                {
                    Items.Remove(item);
                }
            }

            // Make the product available to be added in another cart
            foreach (OrderRowViewerViewModel item in CurrentCart)
            {
                item.ProductViewModel.IsOutFromCart = true;
            }

            CurrentCart.Clear();

            OnPropertyChanged(nameof(TotalPrice));
        }
Beispiel #2
0
 public ViewResult Completed()
 {
     cart.Clear();
     return(View());
 }