private void AddNewInventoryItem() { var data = c.GetItemsNotInStock(currentStoreID); if (data.Count != 0) { Console.WriteLine(@" Items Not Currently Stocked in this Store ID Product Current Stock"); foreach (var x in data) { Console.WriteLine(String.Format("{0,-7} | {1,-26} | {2,-13}", x[0], x[1], x[2])); } while (true) { Console.Write("Select a product ID to add to your inventory: "); var s = Console.ReadLine(); if (Int32.TryParse(s, out int productID)) { try { c.AddNewInventoryItem(currentStoreID, productID); Console.WriteLine($"A request has been made for {c.GetProductNameByID(productID) }."); break; } catch (Exception e) { Console.WriteLine(e.Message); } } else { if (!(s == "" || s == "\n")) { Console.WriteLine("You inserted an invalid ID."); } else { break; } } } } else { Console.WriteLine(@"This store already has all available items in stock."); } }