Esempio n. 1
0
        static int GetPizzaSales(ref bool exit)
        {
            var exit1        = false;
            var selection    = 0;
            var typeSelected = 0;

            while (!exit && !exit1)
            {
                Starter.ChooseSalesPizza();

                int.TryParse(Console.ReadLine(), out selection);

                var repository = new PizzaRepository();
                var orderList  = repository.ReadAll(); // reading all Pizzas for now

                switch (selection)
                {
                case 0: // All types

                    ShowHistory(orderList, selection);
                    exit1 = true;
                    break;

                case 1: // Cheese

                    exit1 = true;
                    break;

                case 2: // Peperroni

                    exit1 = true;
                    break;

                case 3: // Hawaiian

                    exit1 = true;
                    break;

                case 4: // Custom

                    exit1 = true;
                    break;

                default:
                    continue;
                }
                // System.Console.WriteLine();
                // System.Console.WriteLine("Press any key to continue");
            }
            return(typeSelected);
        }