Ejemplo n.º 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();
 }
Ejemplo n.º 2
0
 public void addGraduateStudent(GraduateStudent newStudent)
 {
     rTextBoxGrad.AppendText(newStudent.toString() + "\n");
     rTextBoxGrad.Visible = true;
 }