public bool UpdateCafeMenuMeal(string oldMealName, CafeMenu newMenuItem) { CafeMenu oldMenuItem = SearchMealByName(oldMealName); if (oldMenuItem != null) { oldMenuItem.MealName = newMenuItem.MealName; oldMenuItem.Description = newMenuItem.Description; oldMenuItem.MealNumber = newMenuItem.MealNumber; oldMenuItem.Ingredient = newMenuItem.Ingredient; oldMenuItem.Price = newMenuItem.Price; return(true); } else { return(false); } }
public bool RemoveMealFromMenu(int mealNumber) { CafeMenu menuItem = SearchMealNumber(mealNumber); if (menuItem == null) { return(false); } int initialCount = _listOfMenuItems.Count; _listOfMenuItems.Remove(menuItem); if (initialCount > _listOfMenuItems.Count) { return(true); } else { return(false); } }
public void AddToCafeMenu(CafeMenu menuItem) { _listOfMenuItems.Add(menuItem); }