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; }
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); } }
public OrderChangedEventArgs(Common.DTO.Order order) { this.Order = order; }