public static List <ID_People> FilterIdOnlyList(string RegionID, string CountryID, string StateID, string CityID) { List <ID_People> people = new List <ID_People>(); DataTable dt = PeopleDL.GetFilteredList(RegionID, CountryID, StateID, CityID); foreach (DataRow dr in dt.Rows) { ID_People p = new ID_People(); p.PersonID = Convert.ToInt16(dr["ID"].ToString()); p.PersonName = dr["Name"].ToString(); people.Add(p); } return(people); }
public static List <ID_People> GetIdOnlyList() { List <ID_People> people = new List <ID_People>(); DataTable dt = PeopleDL.GetPeople(); foreach (DataRow dr in dt.Rows) { ID_People p = new ID_People(); p.PersonID = Convert.ToInt16(dr["ID"].ToString()); p.PersonName = dr["Name"].ToString(); people.Add(p); } return(people); }