Пример #1
0
 private void btnChangeCourse_Click(object sender, EventArgs e)
 {
     if (!trainee.ChangeCourse(cbCourses.Text, selectedLevel))
     {
         MessageBox.Show("The trainee is not registered for that course!");
     }
 }
Пример #2
0
        private void btnChangeCourse_Click(object sender, EventArgs e)
        {
            bool changed = trainee.ChangeCourse(cbCourses.Text, getSelectedLevel());

            if (changed == false)
            {
                MessageBox.Show("Course can not be modified since the trainee is not yet enrolled with that code.");
            }
        }
Пример #3
0
        private void btnChangeCourse_Click(object sender, EventArgs e)
        {
            CourseLevel lvl = CourseLevel.BEGINNER;

            if (rbIntermediate.Checked)
            {
                lvl = CourseLevel.INTERMEDIATE;
            }
            else if (rbAdvanced.Checked)
            {
                lvl = CourseLevel.ADVANCED;
            }

            bool changedCourse = trainee.ChangeCourse(cbCourses.Text, lvl);

            if (changedCourse == false)
            {
                MessageBox.Show("Course can not be modified since the trainee is not yet enrolled with that code.");
            }
            ;
        }