private void MenuItem_Click_UpdateTraineeDetails(object sender, RoutedEventArgs e)
        {
            Trainee trainee;

            trainee = MainWindow.bl.GetTraineeByID((TraineeList.SelectedItem as Trainee).Id);
            TraineeDetailsWindow traineeDetailsWindow = new TraineeDetailsWindow(trainee, "Update");

            traineeDetailsWindow.ShowDialog();
        }
Beispiel #2
0
        private void Button_Click_UpdateTrainee(object sender, RoutedEventArgs e)
        {
            GetIDWindow getIDWindow = new GetIDWindow();

            getIDWindow.ShowDialog();
            if (getIDWindow.IsClosedByButton)
            {
                Trainee traine;
                try
                {
                    traine = MainWindow.bl.GetTraineeByID(getIDWindow.TxtBx_ID.Text);
                }
                catch (KeyNotFoundException ex)
                {
                    MessageBox.Show(ex.Message, "ID not Exist", MessageBoxButton.OK, MessageBoxImage.Error);
                    return;
                }
                TraineeDetailsWindow traineeDetailsWindow = new TraineeDetailsWindow(traine, "Update");
                traineeDetailsWindow.ShowDialog();
            }
        }
Beispiel #3
0
        private void Button_Click_ViewTraineeDetails(object sender, RoutedEventArgs e)
        {
            TraineeDetailsWindow traineeDetailsWindow = new TraineeDetailsWindow(trainee, "View");

            traineeDetailsWindow.ShowDialog();
        }
        private void MenuItem_Click_UpdateTrainee(object sender, RoutedEventArgs e)
        {
            TraineeDetailsWindow traineeDetailsWindow = new TraineeDetailsWindow((Trainee)ListBox_TraineesList.SelectedItem, "Update");

            traineeDetailsWindow.ShowDialog();
        }