internal static void GetUserProduct() { Console.WriteLine("\nEnter a product number to add it to your cart: "); bool bit = int.TryParse(Console.ReadLine(), out int userInput); if(bit && cartHasProducts && userInput == counter) { AppNavigater.CheckOut(true); } else if (bit && userInput <= counter) { cartHasProducts = true; AppNavigater.AddProductToCart(userInput, GetQuantity()); Console.Clear(); AppNavigater.InitApp(); } else { InvalidInput(); } }
static void Main(string[] args) { Console.WriteLine("Welcome to the General Store!\n"); AppNavigater.InitApp(); }
private static void InvalidInput() { Console.Clear(); Console.WriteLine("Your input was invalid\n\n"); AppNavigater.InitApp(); }