private void addToOrderButton_Click(object sender, EventArgs e) { chipsOrder.NameOfItem = "Chips"; #region Storing items into Object if (chipsCustomiseCheckBox.GetItemChecked(0)) { chipsOrder.ChipsSalt = true; } else { chipsOrder.ChipsSalt = false; } if (chipsCustomiseCheckBox.GetItemChecked(1)) { chipsOrder.ChipsPepper = true; } else { chipsOrder.ChipsPepper = false; } if (chipsCustomiseCheckBox.GetItemChecked(2)) { chipsOrder.ChipsCheese = true; } else { chipsOrder.ChipsCheese = false; } if (chipsCustomiseCheckBox.GetItemChecked(3)) { chipsOrder.ChipsKetchupDip = true; } else { chipsOrder.ChipsKetchupDip = false; } #endregion Storing items into Object chipsOrder.PriceOfItem = chipsOrder.ReturnTotalCost(); //adds up all the prices of each additional customisation //store This perticular item price to Price of item orderScreen.AddToOrderList(chipsOrder); orderScreen.Show(); this.Dispose(); }
private void addToOrderButton_Click(object sender, EventArgs e) { //need to check radio buttons if (smallRadioButton.Checked) { drinkItem.NameOfItem = "Small Coke"; } if (mediumRadioButton.Checked) { drinkItem.NameOfItem = "Medium Coke"; } if (largeRadioButton.Checked) { drinkItem.NameOfItem = "Large Coke"; } #region Storing items into Object if (smallRadioButton.Checked == true) { drinkItem.DrinkSizeSmall = true; drinkItem.DrinkSizeMed = false; drinkItem.DrinkSizeLrg = false; } else if (mediumRadioButton.Checked == true) { drinkItem.DrinkSizeSmall = false; drinkItem.DrinkSizeMed = true; drinkItem.DrinkSizeLrg = false; } else if (largeRadioButton.Checked == true) { drinkItem.DrinkSizeSmall = false; drinkItem.DrinkSizeMed = false; drinkItem.DrinkSizeLrg = true; } if (drinkCustomiseCheckBox.GetItemChecked(0)) { drinkItem.DrinkIce = true; } else { drinkItem.DrinkIce = false; } if (drinkCustomiseCheckBox.GetItemChecked(1)) { drinkItem.DrinkExtraIce = true; } else { drinkItem.DrinkExtraIce = false; } #endregion Storing items into Object drinkItem.PriceOfItem = drinkItem.ReturnTotalCost(); //adds up all the prices of each additional customisation //store This perticular item price to Price of item //chickenBoxMeal.ReturnAllCustomisation <-- sends an item list with all customisations orderScreen.AddToOrderList(drinkItem); orderScreen.Show(); this.Dispose(); }
private void addToOrderButton_Click(object sender, EventArgs e) { chickenBoxMeal.NameOfItem = "Chicken Box*CUSTOM*"; //need to use .GetItemChecked(index) to retrieve check state (returns true/false) #region Storing items into Object if (chickenCustomizeCheckBox.GetItemChecked(0)) { chickenBoxMeal.ChickenWings = true; } else { chickenBoxMeal.ChickenWings = false; } if (chickenCustomizeCheckBox.GetItemChecked(1)) { chickenBoxMeal.ChickenBreast = true; } else { chickenBoxMeal.ChickenBreast = false; } if (chickenCustomizeCheckBox.GetItemChecked(2)) { chickenBoxMeal.ChickenDrumstick = true; } else { chickenBoxMeal.ChickenDrumstick = false; } if (chickenCustomizeCheckBox.GetItemChecked(3)) { chickenBoxMeal.ChickenPopcorn = true; } else { chickenBoxMeal.ChickenPopcorn = false; } if (chickenCustomizeCheckBox.GetItemChecked(4)) { chickenBoxMeal.DipKetchup = true; } else { chickenBoxMeal.DipKetchup = false; } if (chickenCustomizeCheckBox.GetItemChecked(5)) { chickenBoxMeal.DipBBQ = true; } else { chickenBoxMeal.DipBBQ = false; } if (chickenCustomizeCheckBox.GetItemChecked(6)) { chickenBoxMeal.DipSweetChili = true; } else { chickenBoxMeal.DipSweetChili = false; } if (chickenCustomizeCheckBox.GetItemChecked(7)) { chickenBoxMeal.DipCurry = true; } else { chickenBoxMeal.DipCurry = false; } if (chickenCustomizeCheckBox.GetItemChecked(7)) { chickenBoxMeal.DipGravy = true; } else { chickenBoxMeal.DipGravy = false; } #endregion Storing items into Object chickenBoxMeal.PriceOfItem = chickenBoxMeal.ReturnTotalCost(); //adds up all the prices of each additional customisation //store This perticular item price to Price of item orderScreen.AddToOrderList(chickenBoxMeal); orderScreen.Show(); this.Dispose(); }
private void addToOrderButton_Click(object sender, EventArgs e) { chickenSubItem.NameOfItem = "Chicken Sub*CUSTOM*"; #region Storing items into Object if (ChickenSubCustomiseCheckBox.GetItemChecked(0)) { chickenSubItem.ChickenSubChickenTenders = true; } else { chickenSubItem.ChickenSubChickenTenders = false; } if (ChickenSubCustomiseCheckBox.GetItemChecked(1)) { chickenSubItem.ChickenSubAmericanCheese = true; } else { chickenSubItem.ChickenSubAmericanCheese = false; } if (ChickenSubCustomiseCheckBox.GetItemChecked(2)) { chickenSubItem.ChickenSubLettuce = true; } else { chickenSubItem.ChickenSubLettuce = false; } if (ChickenSubCustomiseCheckBox.GetItemChecked(3)) { chickenSubItem.ChickenSubCucumber = true; } else { chickenSubItem.ChickenSubCucumber = false; } if (ChickenSubCustomiseCheckBox.GetItemChecked(4)) { chickenSubItem.ChickenSubSweetChiliSauce = true; } else { chickenSubItem.ChickenSubSweetChiliSauce = false; } if (ChickenSubCustomiseCheckBox.GetItemChecked(5)) { chickenSubItem.ChickenSubBageutteRoll = true; } else { chickenSubItem.ChickenSubBageutteRoll = false; } //Extra Option if (ChickenSubCustomiseCheckBox.GetItemChecked(6)) { chickenSubItem.ChickenSubExtraChickenTenders = true; } else { chickenSubItem.ChickenSubExtraChickenTenders = false; } if (ChickenSubCustomiseCheckBox.GetItemChecked(7)) { chickenSubItem.ChickenSubExtraAmericanCheese = true; } else { chickenSubItem.ChickenSubExtraAmericanCheese = false; } if (ChickenSubCustomiseCheckBox.GetItemChecked(8)) { chickenSubItem.ChickenSubExtraLettuce = true; } else { chickenSubItem.ChickenSubExtraLettuce = false; } if (ChickenSubCustomiseCheckBox.GetItemChecked(9)) { chickenSubItem.ChickenSubExtraCucumber = true; } else { chickenSubItem.ChickenSubExtraCucumber = false; } if (ChickenSubCustomiseCheckBox.GetItemChecked(10)) { chickenSubItem.ChickenSubExtraChiliSauce = true; } else { chickenSubItem.ChickenSubExtraChiliSauce = false; } #endregion Storing items into Object chickenSubItem.PriceOfItem = chickenSubItem.ReturnTotalCost();//adds up all the prices of each additional customisation //store This perticular item price to Price of item //chickenBoxMeal.ReturnAllCustomisation <-- sends an item list with all customisations orderScreen.AddToOrderList(chickenSubItem); orderScreen.Show(); this.Dispose(); }
private void addToOrderButton_Click(object sender, EventArgs e) { burgerItem.NameOfItem = "Burger*CUSTOM*"; #region Storing items into Object if (burgerCustomiseCheckBox.GetItemChecked(0)) { burgerItem.BurgerBeefPatty = true; } else { burgerItem.BurgerBeefPatty = false; } if (burgerCustomiseCheckBox.GetItemChecked(1)) { burgerItem.BurgerCheese = true; } else { burgerItem.BurgerCheese = false; } if (burgerCustomiseCheckBox.GetItemChecked(2)) { burgerItem.BurgerPickles = true; } else { burgerItem.BurgerPickles = false; } if (burgerCustomiseCheckBox.GetItemChecked(3)) { burgerItem.BurgerOnions = true; } else { burgerItem.BurgerOnions = false; } if (burgerCustomiseCheckBox.GetItemChecked(4)) { burgerItem.BurgerKetchup = true; } else { burgerItem.BurgerKetchup = false; } if (burgerCustomiseCheckBox.GetItemChecked(5)) { burgerItem.BurgerBreadRoll = true; } else { burgerItem.BurgerBreadRoll = false; } if (burgerCustomiseCheckBox.GetItemChecked(6)) { burgerItem.BurgerExtraBeefPatty = true; } else { burgerItem.BurgerExtraBeefPatty = false; } if (burgerCustomiseCheckBox.GetItemChecked(7)) { burgerItem.BurgerExtraCheese = true; } else { burgerItem.BurgerExtraCheese = false; } if (burgerCustomiseCheckBox.GetItemChecked(8)) { burgerItem.BurgerExtraPickles = true; } else { burgerItem.BurgerExtraPickles = false; } if (burgerCustomiseCheckBox.GetItemChecked(9)) { burgerItem.BurgerExtraOnions = true; } else { burgerItem.BurgerExtraOnions = false; } if (burgerCustomiseCheckBox.GetItemChecked(10)) { burgerItem.BurgerExtraKetchup = true; } else { burgerItem.BurgerExtraKetchup = false; } #endregion Storing items into Object burgerItem.PriceOfItem = burgerItem.ReturnTotalCost(); //adds up all the prices of each additional customisation //store This perticular item price to Price of item //chickenBoxMeal.ReturnAllCustomisation <-- sends an item list with all customisations orderScreen.AddToOrderList(burgerItem); orderScreen.Show(); this.Dispose(); }