public void addAllStudents() { clearListBox(); StudentData.AddSomeStudents(); List <Student> students = StudentData.DefaultStudents; foreach (Student student in students) { string fullName = student.FirstName + " " + student.SecondName + " " + student.LastName; this.studentsList.Items.Add(fullName); } }
private Student GetStudentInfoByFacNumber(string facNumber) { // Add students in the list StudentData.AddSomeStudents(); if (facNumber == "") { MessageBox.Show("Please enter a faculity number"); return(null); } Student student = null; try { student = StudentData.GetStudent(facNumber); } catch (Exception exp) { MessageBox.Show(exp.Message); } return(student); }