// Adds the student to the roster on the main form
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     if (radioButtonUndergraduate.Checked)
     {
         UnderGraduate myStudent = new UnderGraduate(textBoxUnderName.Text,
                                                           comboBoxClassification.Text,
                                                           textBoxGuardName.Text,
                                                           textBoxGuardAddress.Text);
         mainForm.addUnderGraduate(myStudent);
     }
     else
     {
         GraduateStudent myStudent = new GraduateStudent(textBoxGradName.Text,
                                                             comboBoxDegree.Text,
                                                             textBoxInstitution.Text);
         mainForm.addGraduateStudent(myStudent);
     }
     this.Hide();
 }
Exemple #2
0
 public void addGraduateStudent(GraduateStudent newStudent)
 {
     rTextBoxGrad.AppendText(newStudent.toString() + "\n");
     rTextBoxGrad.Visible = true;
 }