Example #1
0
        public async Task Menu()
        {
            int    a;
            int    timeAS = 0, timeS = 0;
            string text1AS = " ", text2AS = " ", text3S = " ", text1S = " ", text2S = " ";

            do
            {
                Console.WriteLine("OPCIONES:");
                Console.WriteLine("1: Mostrar Menu");
                Console.WriteLine("2: Limpiar Mesa");
                Console.WriteLine("3: Pedir Comida");
                var opc = Convert.ToInt32(Console.ReadLine());
                a = opc;
                switch (opc)
                {
                case 1:
                    //Console.Clear();
                    var devs      = Platos();
                    var groupname = devs.GroupBy(n => n.Nombre);
                    Console.WriteLine("                                                    MENU");
                    foreach (var nom in devs)
                    {
                        Console.WriteLine(nom.GetPlatillos());
                    }
                    Console.WriteLine("Introduzca su nombre par aresivir el platillo:");
                    string nombreDelCliente = Console.ReadLine();
                    Console.WriteLine("Introduzca el platillo que desea:");
                    int tipoDePlato = int.Parse(Console.ReadLine());
                    switch (tipoDePlato)
                    {
                    case 1:
                        text1AS = "Se pone la Pizza con todos los ingredientes al horno";
                        text2AS = "Se saca la pizza cocinada del horno";

                        text1S = "rter";
                        text2S = "uty";
                        text3S = "wq";
                        timeAS = 5000;
                        timeS  = 1000;
                        break;

                    case 2:
                        text1AS = "adwa";
                        text2AS = "a";

                        text1S = "rr";
                        text2S = "ut";
                        text3S = "q";
                        timeAS = 5000;
                        timeS  = 1000;
                        break;
                    }

                    Chef.Orden(text1AS, text2AS, text1S, text2S, text3S, timeAS, timeS, nombreDelCliente);
                    //Console.ReadKey();
                    break;

                case 2:
                    Mesero.LimpiaMesa();
                    break;
                }
            }while (a != 4);
        }
Example #2
0
        public async Task Menu()
        {
            int    a;
            int    timeAS = 0, timeS = 0;
            string text1AS = " ", text2AS = " ", textRes = " ", text1S = " ", text2S = " ";

            do
            {
                Console.ForegroundColor = ConsoleColor.White;
                Console.WriteLine("     OPCIONES:");
                Console.WriteLine("1: Mostrar Menu y tomar la Orden");
                Console.WriteLine("2: Limpiar Mesas");
                var opc = Convert.ToInt32(Console.ReadLine());
                a = opc;
                switch (opc)
                {
                case 1:
                    //Console.Clear();
                    Mesero.MostrarMenu();

                    Console.Write("Introduzca el Apellido en el cual estra su orden:");
                    string nombreDelCliente = Console.ReadLine();

                    Console.Write("Introduzca el number del platillo que desea:");
                    int tipoDePlato = int.Parse(Console.ReadLine());
                    textRes = SacarNombrePorPrimaryKey(tipoDePlato);

                    text1AS = "Se pone la Pizza " + textRes + " al horno";
                    text2AS = "Se saca la Pizza " + textRes + " del horno";

                    text1S = "Se preparan los " + SacarDescripcionPorPrimaryKey(tipoDePlato);
                    text2S = "La masa esta totalmente preparada y los ingredientes estan listos";



                    switch (tipoDePlato)
                    {
                    case 1:
                        timeAS = 20000;
                        timeS  = 1000;
                        break;

                    case 2:
                        timeAS = 20000;
                        timeS  = 2000;
                        break;

                    case 3:
                        timeAS = 20000;
                        timeS  = 3000;
                        break;

                    case 4:
                        timeAS = 20000;
                        timeS  = 1200;
                        break;

                    case 5:
                        timeAS = 20000;
                        timeS  = 3000;
                        break;

                    case 6:
                        timeAS = 20000;
                        timeS  = 5000;
                        break;
                    }

                    Chef.Orden(text1AS, text2AS, text1S, text2S, textRes, timeAS, timeS, nombreDelCliente);

                    //Console.ReadKey();
                    break;

                case 2:
                    Mesero.LimpiaMesa();
                    break;
                }
            }while (a != 4);
        }