public void AcceptOrder(OrderModel order) { AwaitingOrders.Remove(order); AcceptedOrders.Add(order); _waiterConnectionProvider.AcceptOrder(order.OrderId); NotifyOfPropertyChange(() => CanEndOrder); }
private void WaiterApp_OrderWasAcceptedHandler(object sender, AcceptOrderModel acceptedOrder) { var orderToRemove = AwaitingOrders.FirstOrDefault(o => o.OrderId == acceptedOrder.OrderId); if (orderToRemove != null) { AwaitingOrders.Remove(orderToRemove); } }