private void Button_Click(object sender, RoutedEventArgs e) { addTrade add = new addTrade(); add.Closed += (asd, dsa) => { Show(); Refresh(); }; Hide(); add.Show(); }
private void Button_Click_1(object sender, RoutedEventArgs e) { if (tradeDataGrid.SelectedItem != null) { addTrade add = new addTrade(tradeDataGrid.SelectedItem as Trade); add.Closed += (asd, dsa) => { Show(); Refresh(); }; Hide(); add.Show(); } else { MessageBox.Show("Выберите заказ для внесения изменений"); } }