}/*private void BtnModify_Click(object sender, EventArgs e)*/ /// <summary> /// This method modifies the KidMeal at the given index, where the index /// is the position the meal is in in the meal list. /// </summary> /// <remarks> /// NAME: ModifyKidsMeal /// AUTHOR: Ryan Osgood /// DATE: 8/13/2019 /// </remarks> /// <param name="a_mealIndex">The index of the meal to be modified</param> private void ModifyKidsMeal(int a_mealIndex) { KidsMeal chosenKidsMeal = (KidsMeal)m_customerChecks[m_currentlySelectedTab].GetMealAtIndex(a_mealIndex); KidsMealModification kmm = new KidsMealModification(chosenKidsMeal); kmm.ShowDialog(); UpdateDisplay(); }/*private void ModifyKidsMeal(int a_mealIndex)*/
} /*public KidsMealModification()*/ /// <summary> /// A constructor for the KidsMealModification. Inherits from the default constructor. /// Passes in a KidsMeal and initializes the members that are vital /// to the ability to modify the meal. /// </summary> /// <remarks> /// NAME: KidsMealModification /// AUTHOR: Ryan Osgood /// DATE: 8/15/2019 /// </remarks> /// <param name="a_kidsMeals"></param> public KidsMealModification(KidsMeal a_kidsMeals) : this() { m_kidsMealFromMain = a_kidsMeals; m_mealView = new MealView(m_kidsMealFromMain); PerformViewFormatting(); lbModifiedKidsMeal.DataSource = m_mealView.GetDisplay(); DefaultSide = m_kidsMealFromMain.GetSide().SideIdentifier; DefaultBev = m_kidsMealFromMain.GetBeverage().BeverageIdentifier; CurrentlyChosenSide = m_kidsMealFromMain.GetSide().SideIdentifier; CurrentlyChosenBev = m_kidsMealFromMain.GetBeverage().BeverageIdentifier; GenerateAttributeButtonListAndSetProperties(); CompleteButtonDisplay(); }/*public KidsMealModification(KidsMeal a_kidsMeals) : this()*/
}/*BtnSaladSelection_Click(object sender, EventArgs e)*/ /// <summary> /// This event is raised when any of the Kids Meal options are selected. /// The database is queried for the details of the meal using the /// button's respective tag and the meal is added to the check /// </summary> /// <remarks> /// NAME: BtnKidsMeals_Click /// AUTHOR: Ryan Osgood /// DATE: 8/13/2019 /// </remarks> /// <param name="sender">The button that raised the event</param> /// <param name="e">The EventArgs of the event</param> private void BtnKidsMeals_Click(object sender, EventArgs e) { Button kidsMealButton = sender as Button; Entree sandwich = new Entree(); sandwich.RetrieveAttributesFromDb((string)kidsMealButton.Tag); sandwich.RetrieveBasePriceFromDb((string)kidsMealButton.Tag); KidsMeal kidsMeal = new KidsMeal(); kidsMeal.AddEntreeToMeal(sandwich); KidsMealModification kmm = new KidsMealModification(kidsMeal); kmm.ShowDialog(); m_customerChecks[m_currentlySelectedTab].AddMealToCheck(kidsMeal); UpdateDisplay(); }/*private void BtnKidsMeals_Click(object sender, EventArgs e)*/