Beispiel #1
0
        // Create new MenuContent
        private void CreatNewContent()
        {
            Console.Clear();

            //MealName
            MenuContent newContent = new MenuContent();

            Console.WriteLine("Enter the MealName");
            newContent.MealName = Console.ReadLine();
            //Description
            Console.WriteLine("Enter the description from the content:");
            newContent.DescriptionType = Console.ReadLine();
            //Ingredident list
            Console.WriteLine("Enter the ingredients  for the content (Burgers, Salads, Fries, Desserts, Coffee etc):");
            newContent.Ingredientlist = Console.ReadLine();
            //MealPrice
            Console.WriteLine("Enter the the Meal price for the content(10, 7, 3, 5, 2 etc):");
            string mealpriceAsString = Console.ReadLine();

            //Mealtype
            Console.WriteLine("Would you like to enter the order content of your meal you would like?(y/n)");
            string TypeOfMealString = Console.ReadLine().ToLower();


            if (TypeOfMealString == "y")
            {
                Console.WriteLine("Enter the meal you would like:\n" +
                                  "1.Burgers" +
                                  "2.Salad" +
                                  "3.Fries" +
                                  "4.Deserts" +
                                  "5.Coffee");

                string TypeofMealAsString = Console.ReadLine();
                int    TypeofMealAsInt    = int.Parse(TypeofMealAsString);
                newContent.TypeOfmeal = (MealType)TypeofMealAsInt;

                _contentRepo.AddContentToList(newContent);
            }
        }