void PopulateArray(clsDataConnection DB) { Int32 Index = 0; Int32 RecordCount = 0; RecordCount = DB.Count; mSupplierList = new List <clsSupplier>(); while (Index < RecordCount) { clsSupplier ASupplier = new clsSupplier(); ASupplier.SupplierID = Convert.ToInt32(DB.DataTable.Rows[Index]["SupplierID"]); ASupplier.CompanyName = Convert.ToString(DB.DataTable.Rows[Index]["CompanyName"]); ASupplier.Product = Convert.ToString(DB.DataTable.Rows[Index]["Product"]); ASupplier.PhoneNumber = Convert.ToString(DB.DataTable.Rows[Index]["PhoneNumber"]); ASupplier.EmailAddress = Convert.ToString(DB.DataTable.Rows[Index]["EmailAddress"]); ASupplier.Address = Convert.ToString(DB.DataTable.Rows[Index]["Address"]); ASupplier.PostCode = Convert.ToString(DB.DataTable.Rows[Index]["PostCode"]); mSupplierList.Add(ASupplier); Index++; } }