private void button3_Click(object sender, EventArgs e)
 {
     if (txtName.Text == "" || txtGpa.Text == "" || comboBox1.SelectedIndex == -1)
     {
         MessageBox.Show("Please enter all fields");
     }
     else
     {
         StudentClass.name = txtName.Text;
         StudentClass.dob = System.Convert.ToString(dobPickr.Value);
         StudentClass.gpa = System.Convert.ToDecimal(txtGpa.Text);
         if (comboBox1.SelectedIndex == 0)
         {
             StudentClass.active = true;
         }
         else
         {
             StudentClass.active = false;
         }
         Segment_5.Segment5Student seg5std = new Segment_5.Segment5Student();
         seg5std.Activate();
         this.Close();
     }
     
 }
 private void button3_Click(object sender, EventArgs e)
 {
     if (txtName.Text == "" || txtGpa.Text == "" || comboBox1.SelectedIndex == -1)
     {
         MessageBox.Show("Please enter all fields");
     }
     else
     {
         StudentClass.name = txtName.Text;
         StudentClass.dob  = System.Convert.ToString(dobPickr.Value);
         StudentClass.gpa  = System.Convert.ToDecimal(txtGpa.Text);
         if (comboBox1.SelectedIndex == 0)
         {
             StudentClass.active = true;
         }
         else
         {
             StudentClass.active = false;
         }
         Segment_5.Segment5Student seg5std = new Segment_5.Segment5Student();
         seg5std.Activate();
         this.Close();
     }
 }