1
How can I create variables to serve as possible order status? After the order already made, I want to create options so that when the attendant type, the order status is changed. The options can be: 1-In transit 2-Canceled 3-Delivered
string Cliente = ""; //Cria a variável Cliente em branco
Console.Write("Cliente: "); //Escreve "Cliente" na tela para o usuário.
Cliente = Console.ReadLine(); //Insere na memória o que foi digitado pelo usuário.
--
List<string> Fila;
Fila = new List<string>(); //Fila criada com 10 elementos
I don’t quite understand.
– Harison
Put in some of your code and I’ll edit it to fit it. For example, how you will receive order status, what technology you are using (ASP.NET, Windows Forms. WPF). Enums are great candidates to represent status, without using magic numbers or strings.
– Marcus Vinicius
String Order = (("Customer:") + Customer + (Environment.Newline + "Product:") + Product + (Environment.Newline + "Size:") + Size + (Environment.Newline + "Quantity") + Quantity); //Add the order to memory
– Harison
string Resp = Console.Readline(); //Reads user response to order confirmation if (Resp == "S") //if the answer is yes, displays success message and asks if you want to add another request { Console.Writeline("Request:" + Request); Queue.Add(Request); Console.Write("Registered Request! Do you want to add another order? (S/N)");
– Harison
You are using a console application then. Edit your question and add the code there, as much as you find relevant. Because instead of storing the request with string in the list, it does not use a Request class. There you can edit the Order status as I showed you in the reply.
– Marcus Vinicius