示例#1
0
 /// <summary>
 /// Remove Item Discount
 /// </summary>
 /// <param name="ticketItem"></param>
 /// <param name="item"></param>
 private void RemoveItemDiscount(Dinerware.MenuItem ticketItem, Dinerware.Discount item)
 {
     try
     {
         int ticketItemId   = 0;
         int itemInstanceId = 0;
         int.TryParse(ticketItem.TIID, out ticketItemId);
         int.TryParse(item.InstanceID, out itemInstanceId);
         _dinerwareProvider.RemoveDiscountFromItem(_currentUserId, _currentOpenTicketId, ticketItemId, itemInstanceId);
     }
     catch (Exception ex)
     {
         _logger.WriteLogError(ex, "RemoveItemDiscount");
     }
 }
示例#2
0
 /// <summary>
 /// Void Item
 /// </summary>
 /// <param name="theInfo"></param>
 /// <param name="targetTicket"></param>
 /// <param name="targetItem"></param>
 public void voidItem(IDisplayActions.displayActionInfo theInfo, Dinerware.Ticket targetTicket, Dinerware.MenuItem targetItem)
 {
 }
示例#3
0
 /// <summary>
 /// Remove Discounts
 /// </summary>
 /// <param name="itemLevelDiscountId"></param>
 /// <param name="itemLevelSalePriceId"></param>
 /// <param name="ticketItem"></param>
 private void RemoveDiscounts(int itemLevelDiscountId, int itemLevelSalePriceId, Dinerware.MenuItem ticketItem)
 {
     try
     {
         if (ticketItem.Discounts != null && ticketItem.Discounts.Any())
         {
             var itemDiscounts = ticketItem.Discounts.ToList().Where(t => t.TypeID.Equals(itemLevelDiscountId.ToString()));
             var salesItems    = ticketItem.Discounts.ToList().Where(t => t.TypeID.Equals(itemLevelSalePriceId.ToString()));
             if (itemDiscounts != null)
             {
                 foreach (var item in itemDiscounts)
                 {
                     RemoveItemDiscount(ticketItem, item);
                 }
             }
             if (salesItems != null)
             {
                 foreach (var salesItem in salesItems)
                 {
                     RemoveItemDiscount(ticketItem, salesItem);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         _logger.WriteLogError(ex, "RemoveDiscounts");
     }
 }
示例#4
0
 /// <summary>
 /// RemoveChoice
 /// </summary>
 /// <param name="theInfo"></param>
 /// <param name="targetTicket"></param>
 /// <param name="targetItem"></param>
 /// <param name="targetChoice"></param>
 public void removeChoice(IDisplayActions.displayActionInfo theInfo, Dinerware.Ticket targetTicket, Dinerware.MenuItem targetItem, Dinerware.Choice targetChoice)
 {
     try
     {
         if (!ConfigurationHelper.Instance.IS_Test_Virtual_Client_Connection || !ConfigurationHelper.Instance.IS_Test_BLoyal_Connection)
         {
             return;
         }
         RefreshTicket(targetTicket);
     }
     catch (Exception ex)
     {
         _loggerHelper.WriteLogError(ex, "removeChoice");
     }
 }