Beispiel #1
0
 // 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();
 }
Beispiel #2
0
 public void addUnderGraduate(UnderGraduate newStudent)
 {
     rTextBoxUnder.AppendText(newStudent.toString() + "\n");
     rTextBoxUnder.Visible = true;
 }