Esempio n. 1
0
        }/*public void DeleteMealAtIndex(int a_index)*/

        /// <summary>
        /// Iterates through the meal list and deletes any meals that do not have a
        /// entree, side and beverage.
        /// </summary>
        /// <remarks>
        /// NAME: ClearEmptyMeals
        /// AUTHOR: Ryan Osgood
        /// DATE: 8/14/2019
        /// </remarks>
        public void ClearEmptyMeals()
        {
            for (int i = 0; i < m_customerOrders.Count; i++)
            {
                Meal target = GetMealAtIndex(i);
                if (!target.HasEntree() && !target.HasSide() && !target.HasBeverage())
                {
                    m_customerOrders.Remove(target);
                }
            }
        }/*public void ClearEmptyMeals()*/
Esempio n. 2
0
        }/*public MealView(Meal a_meal)*/

        /// <summary>
        /// Firstly, checks to see if the meal passed into this MealView has an Entree. Depending on
        /// this, perform an action.
        /// </summary>
        /// <remarks>
        /// NAME: GetEntreeForDisplay
        /// AUTHOR: Ryan Osgood
        /// DATE: 8/15/2019
        /// </remarks>
        /// <returns>
        /// If the Meal has an Entree, return a new EntreeView with the entree passed into it. Else,
        /// return a new, empty EntreeView.
        /// </returns>
        public EntreeView GetEntreeForDisplay()
        {
            return(m_customerMeal.HasEntree() ? new EntreeView(m_customerMeal.GetEntree()) : new EntreeView(new Entree()));
        }/*public EntreeView GetEntreeForDisplay()*/