private void button1_Click(object sender, EventArgs e)
 {
     //before opening the child form check for student ID
     if (studentIdTextBox.Text == string.Empty)
     {
         MessageBox.Show("Please enter a student ID.");
         studentIdTextBox.Focus();
     }
     else
     {
         StudentViewCourses studentViewCourses = new StudentViewCourses(int.Parse(studentIdTextBox.Text));
         studentViewCourses.ShowDialog();
     }
 }
        private void viewCoursesButton_Click(object sender, EventArgs e)
        {
            StudentViewCourses studentViewCourses = new StudentViewCourses(studentId);

            studentViewCourses.ShowDialog();
        }