Exemple #1
0
 public OrderDetails(Common.DTO.Drink drink, Common.DTO.Order order)
 {
     this.DrinkName       = drink.Name;
     this.OrderId         = order.OrderId;
     this.OrderStatus     = order.OrderStatus;
     this.OrderStateId    = order.OrderStateId;
     this.SecondsToFinish = order.ExpectedSecondsToDeliver;
 }
Exemple #2
0
        private void _UpdateOrder()
        {
            this.lstOrderView.Items.Clear();

            ListViewItem             item;
            IList <Common.DTO.Order> completedOrders = this._OrderModel.CompletedOrders;
            IList <Common.DTO.Order> pendingOrders   = this._OrderModel.PendingOrders;

            Common.DTO.Order currentOrder = this._OrderModel.CurrentOrder;


            foreach (Common.DTO.Order curOrder in completedOrders)
            {
                item = new ListViewItem {
                    Content = "drink: " + curOrder.DrinkId + ", id: " + curOrder.OrderId + ", status: " + curOrder.OrderStatus + ", timeToFinish: " + curOrder.ExpectedSecondsToDeliver
                };
                item.Background = Brushes.LightPink;
                this.lstOrderView.Items.Add(item);
            }

            if (currentOrder != null)
            {
                item = new ListViewItem {
                    Content = "drink: " + currentOrder.DrinkId + ", id: " + currentOrder.OrderId + ", status: " + currentOrder.OrderStatus + ", timeToFinish: " + currentOrder.ExpectedSecondsToDeliver
                };
                item.Background = Brushes.LightBlue;
                this.lstOrderView.Items.Add(item);
            }

            foreach (Common.DTO.Order curOrder in pendingOrders)
            {
                item = new ListViewItem {
                    Content = "drinkd: " + curOrder.DrinkId + ", id: " + curOrder.OrderId + ", status: " + curOrder.OrderStatus + ", timeToFinish: " + curOrder.ExpectedSecondsToDeliver
                };

                this.lstOrderView.Items.Add(item);
            }
        }
Exemple #3
0
 public OrderChangedEventArgs(Common.DTO.Order order)
 {
     this.Order = order;
 }