private void btnChangeCourse_Click(object sender, EventArgs e) { if (!trainee.ChangeCourse(cbCourses.Text, selectedLevel)) { MessageBox.Show("The trainee is not registered for that course!"); } }
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."); } }
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."); } ; }