public static GuestModifier GetNoMod(Topping topping) { GuestModifier newGuestMod = GetMod(topping); newGuestMod.State = "No"; return(newGuestMod); }
public static GuestModifier GetMod(Topping topping) { DBModifier databaseMod = new DBModifier(); if (DataBaseDictionaries.PizzaToppingsDictionary.ContainsKey(topping.DbItemId)) { databaseMod = DataBaseDictionaries.PizzaToppingsDictionary[topping.DbItemId]; } else { Console.WriteLine("***Debug JOANNE***Topping DB ID not found: " + topping.DbItemId); } GuestModifier newGuestMod = new GuestModifier(databaseMod); newGuestMod.State = "Plus"; switch (topping.ToppingModifier) { case (ToppingModifierType.ExtraTopping): newGuestMod.Multiplier = topping.Count; break; case (ToppingModifierType.NoTopping): newGuestMod.State = "No"; break; case (ToppingModifierType.LightTopping): newGuestMod.State = "Lite"; break; case (ToppingModifierType.ToppingOnSide): newGuestMod.State = "Side"; break; } newGuestMod.Half = "Whole"; if (topping.ToppingWholeHalf == ToppingWholeHalf.HalfA) { newGuestMod.Half = "Half_A"; } else if (topping.ToppingWholeHalf == ToppingWholeHalf.HalfB) { newGuestMod.Half = "Half_B"; } newGuestMod.isDefault = false; newGuestMod.Priority = databaseMod.Priority; return(newGuestMod); }