private void MenuItem_Click_UpdateTraineeDetails(object sender, RoutedEventArgs e)
        {
            if (TraineeList.SelectedItem == null)
            {
                return;
            }
            Trainee trainee;

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

            traineeDetailsWindow.ShowDialog();
            ComboBox_GroupOptions.SelectedIndex = (int)TraineeGroupCategorys.הכל;
            ComboBox_GroupOptions_SelectionChanged(null, null);
            SearchFilterChanged(null, null);
        }
Exemple #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, "נתון חסר", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.None,
                                    MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign);
                    return;
                }
                TraineeDetailsWindow traineeDetailsWindow = new TraineeDetailsWindow(traine, "Update");
                traineeDetailsWindow.ShowDialog();
            }
        }
Exemple #3
0
        private void Button_Click_ViewTraineeDetails(object sender, RoutedEventArgs e)
        {
            TraineeDetailsWindow traineeDetailsWindow = new TraineeDetailsWindow(trainee, "View");

            traineeDetailsWindow.ShowDialog();
        }