public void UpdateBooth(DateTime partyDate, Booth newBooth, string boothType)
 {
     if (boothType.ToLower() == "burger")
     {
         BurgerBooth newBurgerBooth = (BurgerBooth)newBooth;
         BurgerBooth oldBooth       = (BurgerBooth)GetBooth(partyDate, boothType);
         oldBooth.HamburgerTickets    = newBurgerBooth.HamburgerTickets;
         oldBooth.HotDogTickets       = newBurgerBooth.HotDogTickets;
         oldBooth.VeggieBurgerTickets = newBurgerBooth.VeggieBurgerTickets;
     }
     else if (boothType.ToLower() == "treat")
     {
         TreatBooth oldBooth      = (TreatBooth)GetBooth(partyDate, boothType);
         TreatBooth newTreatBooth = (TreatBooth)newBooth;
         oldBooth.IceCreamTickets = newTreatBooth.IceCreamTickets;
         oldBooth.PopcornTickets  = newTreatBooth.PopcornTickets;
     }
 }
Exemplo n.º 2
0
 public Party(DateTime partyDate, BurgerBooth burgerBooth, TreatBooth treatBooth)
 {
     PartyDate   = partyDate;
     BurgerBooth = burgerBooth;
     TreatBooth  = treatBooth;
 }