private void EditTest(object sender, RoutedEventArgs e) { UpdateTestWindow window = new UpdateTestWindow(Test); window.ShowDialog(); Test = iBL_Imp.SearchTest(Test.Test_number)[0]; Fill_data(); }
private void UpdateTest_Click(object sender, RoutedEventArgs e) { try { if (testsListView.SelectedItem == null) { MessageBox.Show("Please select a test to update from the list"); return; } Test test = testsListView.SelectedItem as Test; UpdateTestWindow updateTestWindow = new UpdateTestWindow(test); IsEnabled = false; updateTestWindow.Show(); updateTestWindow.Closed += ChildWindowClosed; } catch (Exception ex) { HandleExceptions.Handle(ex, this); } }
/// <summary> /// This function updates a test when we press on the button "Update Test" /// This is a sighnup function for a click event /// </summary> /// <param name="sender">Who is sensing the event</param> /// <param name="e">Details of the event occurred</param> private void TestUpdateButton_Click(object sender, RoutedEventArgs e) { UpdateTestWindow updateTestWind = new UpdateTestWindow(); updateTestWind.ShowDialog(); }