private void AddButton_Click(object sender, RoutedEventArgs e) { var editWindow = new EditWindow(false); editWindow.Show(); editWindow.Closed += EditWindow_Closed; }
private void StudentsDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { DataGrid dataGrid = (DataGrid)sender; Student student = (Student)dataGrid.SelectedItem; var editWindow = new EditWindow(true); editWindow.InsertStudent(student); editWindow.Show(); editWindow.Closed += EditWindow_Closed; }