Ejemplo n.º 1
0
        private void AddItemToMenu()
        {
            KomodoMenu newItem = new KomodoMenu();

            Console.Clear();
            Console.WriteLine("Enter the name");
            newItem.Name = Console.ReadLine();

            Console.WriteLine("Give a brief description");
            newItem.Description = Console.ReadLine();

            Console.WriteLine("what are the ingredients?");
            newItem.Ingredients = Console.ReadLine();

            Console.WriteLine("what is the price?");
            newItem.Price = int.Parse(Console.ReadLine());

            _menuRepo.AddItemToMenu(newItem);
        }
Ejemplo n.º 2
0
        private void AddMenuItem()
        {
            KomodoMenu item = new KomodoMenu();

            Console.WriteLine("What will the # of this new meal be on the menu?");
            int mealNumber = int.Parse(Console.ReadLine());

            item.MealNumber = mealNumber;

            Console.WriteLine("What name will you give to this new meal on the menu?");
            string mealName = Console.ReadLine();

            item.MealName = mealName;

            Console.WriteLine("Would you describe this new meal as vegetarian? Y or N");
            string isVegieStr = Console.ReadLine().ToLower();
            bool   isVegie;

            if (isVegieStr.Contains("y"))
            {
                isVegie = true;
            }
            else
            {
                isVegie = false;
            }
            item.IsVegie = isVegie;

            Console.WriteLine("Which ingredients will be included in this new meal?");
            string ingredients = Console.ReadLine();

            item.MealIngreds = ingredients;

            Console.WriteLine("What will be the price of this new meal on the menu?");
            decimal mealPrice = decimal.Parse(Console.ReadLine());

            item.MealPrice = mealPrice;

            _komodoRepo.AddItemToList(item);
        }
Ejemplo n.º 3
0
 public void RemoveMenuItem(KomodoMenu delete)
 {
     _menuItem.Remove(delete);
 }
Ejemplo n.º 4
0
 public void AddItemToMenu(KomodoMenu newMenuItem)
 {
     _menuItem.Add(newMenuItem);
 }
Ejemplo n.º 5
0
 public void RemoveItemFromList(KomodoMenu item)
 {
     _menuList.Remove(item);
 }
Ejemplo n.º 6
0
 public void AddItemToList(KomodoMenu item)
 {
     _menuList.Add(item);
 }