%PDF- %PDF-
Direktori : /www/old2/_music/diplomka/ |
Current File : /www/old2/_music/diplomka/EventLogDataReader.cs.patch |
Index: WCF/Services/EventLogDataReader.cs =================================================================== --- WCF/Services/EventLogDataReader.cs (revision 3791) +++ WCF/Services/EventLogDataReader.cs (working copy) @@ -18,7 +18,7 @@ private readonly IEnumerable<DataRow> _selectedRows; private int _position; private readonly bool _isInitialized; - private readonly DataTable _table; + private readonly CommServerDataSet.PanelEventLogDataDataTable _table; private DateTime _lastAccess = DateTime.Now; private readonly int _maxLen = int.MaxValue; private readonly CommServerDataSet _dataSet; @@ -89,9 +89,12 @@ { filter = String.Format(" AND EventTimestamp >= '{0}' AND EventTimestamp <= '{1}'", GetStandardDateTimeString(args.StartTime), GetStandardDateTimeString(args.StopTime)); } - _table = dataService.GetDataTableWithFilter(_dataSet.PanelEventLogData.TableName, String.Format("PanelEventLogID='{0}'{1}", panelEventLogId, filter)); - _selectedRows = from p in _table.AsEnumerable() orderby p["EventTimestamp"] descending select p; - _isInitialized = true; + _table = dataService.GetDataTableWithFilter(_dataSet.PanelEventLogData.TableName, String.Format("PanelEventLogID='{0}'{1}", panelEventLogId, filter)) as CommServerDataSet.PanelEventLogDataDataTable; + if (_table != null) + { + _selectedRows = _table.OrderByDescending(p => p.EventUID); + _isInitialized = true; + } } }