private void button1_Click(object sender, EventArgs e) { if (pitt.getStudentByID(int.Parse(bunifuMaterialTextbox6.Text)) == null) { MessageBox.Show("This Action was not Perfromed because The Course ID You entered Did Not Exist..."); } else { pitt.signStudent(int.Parse(bunifuMaterialTextbox6.Text), int.Parse(nametext.Text)); MessageBox.Show("Student is Succesfully Added"); } }
private void button3_Click(object sender, EventArgs e) { var a = pitt.getStudentByID(int.Parse(nametext.Text)); if (a == null)//||(((pitt.getCourseByID(courseID)).myStudents).contains(pitt.getStudentByID(studenID)))==false) { MessageBox.Show("Student not Found..."); } else { bunifuMaterialTextbox1.Text = a.getName(); bunifuMaterialTextbox2.Text = a.getCourseCount().ToString(); } }