Beispiel #1
0
        public static void AddProductToCart(int userInput, int qty)
        {
            ProductsList   productsList = HandleJsonData.GetProducts();
            List <Product> products     = productsList.ProductList;

            ShoppingCartItem cartItem = new ShoppingCartItem(products[userInput - 1], qty);

            ShoppingCart.AddToCart(cartItem);
        }
Beispiel #2
0
 internal static void InitApp()
 {
     ShoppingCart.InitCart();
     WriteToConsole.WriteProducts(HandleJsonData.GetProducts());
     WriteToConsole.GetUserProduct();
 }