示例#1
0
        private void Add(object obj)
        {
            var dialogVM     = new AddOrderDialogViewModel(_connectionName);
            var dialogWindow = new AddOrderDialog(dialogVM);

            dialogWindow.ShowDialog();
            if (dialogWindow.DialogResult == true)
            {
                try
                {
                    orderService.StartOrder(dialogVM.Order.ClientId, dialogVM.Order.PizzaId, dialogVM.Order);
                }
                catch (Exception e)
                {
                    NLog.LogManager.GetCurrentClassLogger().Error(e, "Ошибка заказа");
                }
                UpdateOrders();
            }
        }
示例#2
0
 private void NewOrderButton_OnClick(object sender, RoutedEventArgs e)
 {
     AddOrderDialog.GetAddCustomerOrderWindow().Show();
 }