public List<Maker> GetMakerList() { IDAL dal = GetDAL(); string query = "SELECT * FROM Gyartok", error = string.Empty; SqlDataReader rdr = dal.ExecuteReader(query, ref error); List<Maker> makerList = null; if (error == "OK") { makerList = new List<Maker>(); while (rdr.Read()) { Maker m = new Maker(); m.MakerID = Convert.ToInt32(rdr[0]); m.CountryID = Convert.ToInt32(rdr[1]); m.MakerName = rdr[2].ToString(); m.MakerFoundYear = Convert.ToInt32(rdr[3]); makerList.Add(m); } } dal.CloseDataReader(rdr); return makerList; }