Пример #1
0
        private void addTransportButton_Click(object sender, RoutedEventArgs e)
        {
            AddTransportWindow form = new AddTransportWindow();

            form.ShowDialog();
            this.ShowAll();
        }
Пример #2
0
 private void editTransportButton_Click(object sender, RoutedEventArgs e)
 {
     if (transportsGrid.SelectedItem != null)
     {
         var edit = (Transport)transportsGrid.SelectedItem;
         AddTransportWindow form = new AddTransportWindow(DBContext.Orders.Find(edit.ID).ID);
         form.ShowDialog();
     }
     else
     {
         MessageBox.Show("Не выбрано поле для редактирования", "Ошибка");
     }
     this.ShowAll();
 }