예제 #1
0
        public Order BuildOrderFromOrderKey(int inOrderDbKey)
        {
            var order = DbOrder.GetOrder(inOrderDbKey, ChefmateController.Instance.CurrenTerminal.TerminalId);

            SetOrderState(order);
            return(order);
        }
예제 #2
0
 private void SelectedOrderChangedHandler()
 {
     if (_selectedOrder != null)
     {
         this.IsEnabled = false;
         StatusText     = "Loading Items......";
         var order = DbOrder.GetOrder(_selectedOrder.OrderKey, 0, true);
         SelectedOrderItems = order.Items;
         this.IsEnabled     = true;
         StatusText         = "";
     }
 }
예제 #3
0
 public void AddRecallOrder(Order inOrder)
 {
     lock (_syncRoot)
     {
         var order = DbOrder.GetOrder(inOrder.OrderKey, 0, true);
         AnalyticalData.CurrentOrdersCount++;
         AnalyticalData.CurrentItems += order.Items.Count;
         TimeSpan recalledOrderMakeTime = order.BumpTime - order.ArrivalTime;
         AnalyticalData.TotalMakeTime = new TimeSpan(AnalyticalData.TotalMakeTime.Ticks - recalledOrderMakeTime.Ticks);
         foreach (var item in order.Items)
         {
             DbOrderItem.UpdateOrderItemTerminalKey(item.OrderItemKey, CurrenTerminal.TerminalId);
         }
         TotalOrders.Add(order);
         PublishAddOrder(order);
     }
 }