public PersonVO SetPersonDataUsingPersonId(int personid) { PersonVO personVO = new PersonVO(); DataTable dataTable = new DataTable(); dataTable = person.GetPersonDataUsingPersonId(personid); if (dataTable.Rows.Count == 0) { return(null); } foreach (DataRow dr in dataTable.Rows) { personVO.PersonID = Int32.Parse(dr["PersonID"].ToString()); personVO.FirstName = dr["FirstName"].ToString(); personVO.LastName = dr["LastName"].ToString(); personVO.Sex = dr["Sex"].ToString(); personVO.BirthDate = dr["BirthDate"].ToString(); personVO.VoterID = dr["VoterID"].ToString(); } return(personVO); }