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(); } }
private void NewOrderButton_OnClick(object sender, RoutedEventArgs e) { AddOrderDialog.GetAddCustomerOrderWindow().Show(); }