public DataTable GetDataTable( Dictionary <string, object> properties, bool exactMatch, bool shapeColumnNames, bool expired, DeviceConfigCache filteredDeviceConfigCache) { DataTable result = EntityReader <DeviceConfig> .GetDataTable(shapeColumnNames); List <DeviceConfig> deviceConfigItems = GetEntitiesByProperties(properties, exactMatch); filteredDeviceConfigCache.Clear(); foreach (DeviceConfig d in deviceConfigItems) { if ((d.LicenseExpiryDate < DateTime.Now && expired) || (d.LicenseExpiryDate > DateTime.Now && !expired)) { DataRow row = EntityReader <DeviceConfig> .PopulateDataRow(d, result.NewRow(), shapeColumnNames); result.Rows.Add(row); filteredDeviceConfigCache.Add(d); } } return(result); }
public virtual DataTable GetDataTable(Dictionary <string, object> properties, bool exactMatch, bool shapeColumnNames) { DataTable result = EntityReader <E> .GetDataTable(shapeColumnNames); List <E> entities = GetEntitiesByProperties(properties, exactMatch); foreach (E e in entities) { DataRow row = EntityReader <E> .PopulateDataRow(e, result.NewRow(), shapeColumnNames); result.Rows.Add(row); } return(result); }