Пример #1
0
        public void AcceptOrder(OrderModel order)
        {
            AwaitingOrders.Remove(order);
            AcceptedOrders.Add(order);

            _waiterConnectionProvider.AcceptOrder(order.OrderId);
            NotifyOfPropertyChange(() => CanEndOrder);
        }
Пример #2
0
        private void WaiterApp_OrderWasAcceptedHandler(object sender, AcceptOrderModel acceptedOrder)
        {
            var orderToRemove = AwaitingOrders.FirstOrDefault(o => o.OrderId == acceptedOrder.OrderId);

            if (orderToRemove != null)
            {
                AwaitingOrders.Remove(orderToRemove);
            }
        }