Пример #1
0
 public void DisplayCart(StoreBasket basket)
 {
     Console.WriteLine($"{"Item",-20}{"Cost"}");
     foreach (KeyValuePair <Merchandise, double> Item in customerCart.BasketItems)
     {
         Console.WriteLine($"{Item.Key,-20}: {Item.Value:C}");
     }
 }
Пример #2
0
        public void AddToCart(StoreBasket basket)
        {
            //I think I should have an enumerator list for the type
            //case it out in a switch statement to which item it gets converted to
            //with what qualities?

            //this should also access the store quantity and change store system
            //inventory of x product by - x number of product taken
        }
Пример #3
0
        public void PurchaseCart(StoreBasket basket)
        {
            foreach (KeyValuePair <Merchandise, double> BasketItem in customerCart.BasketItems)
            {
                getMoneyAmount -= BasketItem.Value;
                Inventory.Add(BasketItem.Key);
            }

            customerCart.BasketItems.Clear();
        }