Ejemplo n.º 1
0
        //Create new Items dialog
        private void CreateNewItem()
        {
            Console.Clear();
            MenuItems newMenuItem = new MenuItems();

            newMenuItem.MealNum = _menuItemsRepo.MenuItemNum();
            Console.WriteLine("Enter the new meal name: ");
            newMenuItem.MealName = Console.ReadLine();
            //MenuItem Description
            Console.WriteLine("Enter the meal description: ");
            newMenuItem.MealDesc = Console.ReadLine();
            //Ingredients
            Console.WriteLine("Please enter the ingredients: ");
            newMenuItem.Ingredients = Console.ReadLine();
            //Price ;
            Console.WriteLine("Please enter the price: ");
            string priceAsString = Console.ReadLine();

            newMenuItem.Price = double.Parse(priceAsString);
            _menuItemsRepo.AddItemsToList(newMenuItem);
            Console.WriteLine("New item added!");
        }
Ejemplo n.º 2
0
        public void SeedItemList()
        {
            MenuItems pbj = new MenuItems(_repo.MenuItemNum(), "PB&J", "Peanutbutter sandwich with veggie sticks", "peanutbutter, grape jelly, bread, carrots, celery", 8.99);

            _repo.AddItemsToList(pbj);
            MenuItems macnCheese = new MenuItems(_repo.MenuItemNum(), "Mac N'Cheese", "Macaroni and cheese with a side of bread", "Macaroni, cheese, bread, butter", 7.99);

            _repo.AddItemsToList(macnCheese);
            MenuItems tunaMelt = new MenuItems(_repo.MenuItemNum(), "Tuna Melt", "Tuna fish sanwich with cheese and grilled served with a side of tomato soup", "Tuna, mayo, pickle relish, cheese slices, bread, butter, tomato soup", 9.99);

            _repo.AddItemsToList(tunaMelt);
        }