Beispiel #1
0
 private void UpdateTicketOptions(TextBlockButton button)
 {
     if ((SessionManager.ActiveTicketItem == null) || (button == null))
     {
         return;
     }
     // DEBUG: This isn't always going to be 'this' simple... If the ingredient
     // is already on, then it's might be getting removed (not added)... It
     // might also indicate the addition of extra. Change count (the constant '1',
     // in the Add() below) is always positive, even on deletions. It's a factor
     // that allows support for "extra-extra" type options.
     if (button.IsChecked == true)
     {
         if (!TicketItemOption.HasOption(SessionManager.ActiveTicketItem.PrimaryKey,
                                         GetId(button)))
         {
             TicketItemOption option =
                 TicketItemOption.Add(SessionManager.ActiveTicketItem.PrimaryKey.Id,
                                      GetId(button), PosModels.Types.TicketItemOptionType.None, 1);
         }
     }
     else
     {
         TicketItemOption.Delete(SessionManager.ActiveTicketItem,
                                 GetId(button), true);
     }
     OrderEntryControl.UpdateDisplayedOrderAmount();
 }
Beispiel #2
0
 private void UpdateTicketOptions(TextBlockButton button)
 {
     if (button.IsChecked == true)
     {
         if (!TicketItemOption.HasOption(SessionManager.ActiveTicketItem.PrimaryKey,
                                         GetId(button)))
         {
             TicketItemOption option =
                 TicketItemOption.Add(SessionManager.ActiveTicketItem.PrimaryKey.Id,
                                      GetId(button), PosModels.Types.TicketItemOptionType.Add, 1);
         }
     }
     else
     {
         TicketItemOption.Delete(
             SessionManager.ActiveTicketItem,
             GetId(button), true);
     }
     OrderEntryControl.UpdateDisplayedOrderAmount();
 }