internal static CollectorCollection SortedByName() { var dataTable = DatabaseController.ExecuteSelectQuery("SELECT * FROM Collectors ORDER BY CollectorName"); var collection = new CollectorCollection(); foreach (DataRow dataRow in dataTable.Rows) { var item = new Collector(); item.SetPropertiesFromDataRow(dataRow); collection.Add(item); } return(collection); }
internal static CollectorCollection CollectAll() { var dataTable = DatabaseController.ExecuteSelectQuery("SELECT * FROM " + TABLE_NAME); var collection = new CollectorCollection(); foreach (DataRow dataRow in dataTable.Rows) { var item = new Collector(); item.SetPropertiesFromDataRow(dataRow); collection.Add(item); } return(collection); }