// Prompt User Select Menu Items by Categories or List All // Select Quant // Store line total and name of product in receipt public void promptReceipt() { string addItem = "Some Menu Item"; // Use this as your string a new menu item int lineItemTotal = 1; // Put the total of a menu item here var newReceiptItem = new Receipt(addItem, lineItemTotal); Receipt.AddItemToReceipt(newReceiptItem); // This will add a ReceiptItem to the Receipt list }
static void EnterQty() { do { Console.Write(Environment.NewLine + "Enter quantity: "); string userInput = Console.ReadLine(); if (int.TryParse(userInput, out int result)) { lineTotal = result * _selectedGame.Price; Console.WriteLine("Qty: " + result + " | $" + lineTotal); var newReceiptItem = new Receipt(_selectedGame.Name, lineTotal); Receipt.AddItemToReceipt(newReceiptItem); break; } else { Console.WriteLine("Invalid selection. Please try again..." + Environment.NewLine); continue; } } while (true); FinalCountdown(); }