private void rdbTrainee_Checked(object sender, RoutedEventArgs e)
        {
            TraineeWindow tw = new TraineeWindow(false);

            tw.Show();
            this.Close();
        }
Esempio n. 2
0
        private void Button_login(object sender, RoutedEventArgs e)
        {
            try
            {
                string TypeOfUser = bl.getTypeOfUser(int.Parse(idInput.Text));
                switch (TypeOfUser)
                {
                case "Trainee":
                    TraineeWindow traineeWindow = new TraineeWindow(bl.getTrainee(int.Parse(idInput.Text)));
                    traineeWindow.Show();
                    Close();
                    break;

                case "Tester":
                    TesterWindow testerWindow = new TesterWindow(bl.getTester(int.Parse(idInput.Text)));
                    testerWindow.Show();
                    Close();
                    break;
                }
            }
            catch (Exception exception)
            {
                HandleExceptions.Handle(exception, this);
            }
        }
        private void ListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            object dataContext = ((FrameworkElement)e.OriginalSource).DataContext;

            if (dataContext is Tester)
            {
                TesterWindow testerWindow = new TesterWindow((Tester)testersListView.SelectedItem);
                testerWindow.Show();
                testerWindow.Closed += ChildWindowClosed;
                IsEnabled            = false;
                return;
            }
            if (dataContext is Trainee)
            {
                TraineeWindow traineeWindow = new TraineeWindow((Trainee)traineesListView.SelectedItem);
                traineeWindow.Show();
                traineeWindow.Closed += ChildWindowClosed;
                IsEnabled             = false;
                return;
            }
        }
Esempio n. 4
0
        /// <summary>
        /// This function will open the window of a new trainee when we press on the button "Trainee"
        /// 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 TraineeButton_Click(object sender, RoutedEventArgs e)
        {
            TraineeWindow traineeWind = new TraineeWindow();

            traineeWind.ShowDialog();
        }
Esempio n. 5
0
        private void ButtonTrainee_Click(object sender, RoutedEventArgs e)
        {
            TraineeWindow traineeWindow = new TraineeWindow(manage);

            traineeWindow.ShowDialog();
        }