Пример #1
0
 private void SubmitOrderExecute()
 {
     if (Repository != null && CurrentlySelectedMenuItems != null && CurrentlySelectedMenuItems.Count != 0)
     {
         Repository.Orders.Add(new Order {
             Table = Repository.Tables.First(), Items = CurrentlySelectedMenuItems.ToList()
         });
         CurrentlySelectedMenuItems.Clear();
     }
 }
        private async void SubmitOrder()
        {
            Repository.Orders.Add(
                new Order
            {
                Items    = CurrentlySelectedMenuItems.ToList(),
                Table    = Repository.Tables.First(),
                Expedite = false
            });

            CurrentlySelectedMenuItems.Clear();

            await new MessageDialog("Order has been submitted").ShowAsync();
        }
Пример #3
0
        private void SubmitOrderExecute(string message)
        {
            Order NewOrder = new Order {
                Complete        = false,
                Expedite        = false,
                SpecialRequests = SpecialRequestsText,
                Table           = new Table {
                    Description = "Test table"
                },
                Items = CurrentlySelectedMenuItems.ToList()
            };

            Repository.Orders.Add(NewOrder);
            new MessageDialog(message).ShowAsync();
            CurrentlySelectedMenuItems.Clear();
            SpecialRequestsText = String.Empty;
        }
Пример #4
0
        private void SubmitOrder(object obj)
        {
            List <MenuItem> selectedItems = CurrentlySelectedMenuItems.ToList();

            var order = new Order();

            order.Complete        = false;
            order.SpecialRequests = String.IsNullOrEmpty(Request) ? "N/A" : Request;
            order.Table           = new Table {
                Description = "Corner"
            };
            order.Items = selectedItems;
            Repository.Orders.Add(order);
            Request = String.Empty;
            CurrentlySelectedMenuItems.Clear();

            DisplaypopupMessage();
        }