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