}/*public void ClearMembersForReinitialization()*/

        /// <summary>
        /// Using the meals within the CustomerCheck, generate their respective
        /// MealViews and add them to the MealView list.
        /// </summary>
        /// <remarks>
        /// NAME: RefreshMealViews
        /// AUTHOR: Ryan Osgood
        /// DATE: 8/16/2019
        /// </remarks>
        public void RefreshMealViews()
        {
            for (int i = 0; i < m_customerCheck.NumberOfMeals(); i++)
            {
                Meal meal = new Meal();
                meal = m_customerCheck.GetMealAtIndex(i);

                MealView mealView = new MealView(meal);
                m_customerMealViews.Add(mealView);
            }
        }/*public void RefreshMealViews()*/
Ejemplo n.º 2
0
        }/*private bool ValidateDeleteAction()*/

        /// <summary>
        /// Determines if the current delete action is a void or standard delete. A void is
        /// performed when the user wants to delete an item that has already been sent to
        /// the KitchenScreenClient.
        /// </summary>
        /// <remarks>
        /// NAME: DetermineIfVoidOrDelete
        /// AUTHOR: Ryan Osgood
        /// DATE: 8/13/2019
        /// </remarks>
        /// <param name="a_mealIndex">The position of the meal within the meal list.</param>
        /// <returns>
        /// Returns true if the action is a void, false if standard delete.
        /// </returns>
        private bool DetermineIfVoidOrDelete(int a_mealIndex)
        {
            CustomerCheck currentlySelectedCheck = m_customerChecks.ElementAt(m_currentlySelectedTab);
            Meal          currentlySelectedMeal  = currentlySelectedCheck.GetMealAtIndex(a_mealIndex);

            return(currentlySelectedMeal.SentFlag);
        }/*private bool DetermineIfVoidOrDelete(int a_mealIndex)*/
Ejemplo n.º 3
0
        }/*private void BtnSendOrdersOnTill_Click(object sender, EventArgs e)*/

        /// <summary>
        /// Flag all the items on the current tab as sent.
        /// </summary>
        /// <remarks>
        /// NAME: FlagMealsOnTillAsSent
        /// AUTHOR: Ryan Osgood
        /// DATE: 8/13/2019
        /// </remarks>
        private void FlagMealsOnTillAsSent()
        {
            CustomerCheck currentlySelected = m_customerChecks[m_currentlySelectedTab];

            for (int i = 0; i < currentlySelected.NumberOfMeals(); i++)
            {
                Meal mealOnTill = currentlySelected.GetMealAtIndex(i);
                mealOnTill.SentFlag = true;
            }
        }/*private void FlagMealsOnTillAsSent()*/