private Student GetStudent(int personId) { StudentData sd = new StudentData(); List <Person> specialists = sd.GetList(); Person person = specialists.Find(x => x.PersonId == personId); person.FirstName = person.GetFullName(); return((Student)person); }
public Student GetStudent(int StudentId) { StudentData sd = new StudentData(); List <Person> list = sd.GetList("SELECT * FROM Vw_Students WHERE StudentId=" + StudentId); Student st; if (list.Count > 0) { st = (Student)list[0]; } else { st = null; } return(st); }