public Scanner GetScanner(string sourceName) { //Return an existing scanner for this terminal Scanner scanner = null; try { //Read from the collection (dataset) ScannerDS ds = new ScannerDS(); ds.Merge(this.mScannerDS.ScannerTable.Select("SourceName='" + sourceName + "'")); scanner = new Scanner(ds.ScannerTable[0].SourceName, App.ICON_SCANNER, App.ICON_SCANNER, ds.ScannerTable[0], 1, this.mMediator); } catch (Exception ex) { throw ex; } return(scanner); }
public ScannerDS GetLogEntries(string eventLogName, DateTime startDate, DateTime endDate) { //Refresh data for this object ScannerDS logEntries = null; try { logEntries = new ScannerDS(); DataSet ds = fillDataset(USP_TRACELOG_GETLIST, TBL_TRACELOG_GETLIST, new object[] { eventLogName, startDate, endDate }); if (ds != null) { logEntries.Merge(ds); } } catch (Exception ex) { throw new ApplicationException("Unexpected error reading log entries.", ex); } return(logEntries); }
public ScannerDS GetCubeDetail(string labelSequenceNumber) { //Refresh data for this object ScannerDS detail = null; try { detail = new ScannerDS(); DataSet ds = fillDataset(USP_CUBEDETAIL_SEARCH, TBL_CUBEDETAILS, new object[] { labelSequenceNumber }); if (ds != null) { detail.Merge(ds); } } catch (Exception ex) { throw new ApplicationException("Unexpected error reading cube detail.", ex); } return(detail); }
public ScannerDS GetCubeStatsSummary(string sourceName, DateTime startDate, DateTime endDate) { // ScannerDS summary = null; try { //Clear cuurent collection and re-populate summary = new ScannerDS(); DataSet ds = fillDataset(USP_CUBESTATSSUM, TBL_CUBESTATSSUM, new object[] { sourceName, startDate, endDate }); if (ds != null) { summary.Merge(ds); } } catch (Exception ex) { throw new ApplicationException("Unexpected error reading cube statistics summary.", ex); } return(summary); }
public ScannerDS GetCubeDetails(string sourceName, DateTime startDate, DateTime endDate) { // ScannerDS details = null; try { //Clear cuurent collection and re-populate details = new ScannerDS(); DataSet ds = fillDataset(USP_CUBEDETAILS, TBL_CUBEDETAILS, new object[] { sourceName, startDate, endDate }); if (ds != null) { ScannerDS _ds = new ScannerDS(); _ds.Merge(ds); details.Merge(_ds.Tables[TBL_CUBEDETAILS].Select("", "CubeDate DESC")); } } catch (Exception ex) { throw new ApplicationException("Unexpected error reading cube details.", ex); } return(details); }
public ScannerDS GetCubeStats(string sourceName, DateTime startDate, DateTime endDate) { // ScannerDS stats = null; try { //Clear cuurent collection and re-populate stats = new ScannerDS(); DataSet ds = fillDataset(USP_CUBESTATS, TBL_CUBESTATS, new object[] { sourceName, startDate, endDate }); if (ds.Tables[TBL_CUBESTATS].Rows.Count > 0) { ScannerDS _ds = new ScannerDS(); _ds.Merge(ds); stats.Merge(_ds.CubeStatisticsTable.Select("", "DATE DESC, HOUR DESC")); } } catch (Exception ex) { throw new ApplicationException("Unexpected error reading cube statistics.", ex); } return(stats); }
public void RefreshCubeDetails() { //Clear existing entries and refresh collection try { //Clear cuurent collection and re-populate this.mCubeDetailsDS.Clear(); DataSet ds = this.mMediator.FillDataset(App.USP_CUBEDETAILS, App.TBL_CUBEDETAILS, new object[] { this.mSourceName, DateTime.Today.AddDays(-this.mDaysBack), DateTime.Now }); if (ds != null) { ScannerDS _ds = new ScannerDS(); _ds.Merge(ds); this.mCubeDetailsDS.Merge(_ds.Tables[App.TBL_CUBEDETAILS].Select("", "CubeDate DESC")); } } catch (Exception ex) { throw ex; } finally { if (this.CubeDetailsChanged != null) { this.CubeDetailsChanged(this, EventArgs.Empty); } } }
public void RefreshCubeStats() { //Clear existing entries and refresh collection try { //Clear cuurent collection and re-populate this.mCubeStatsDS.Clear(); DataSet ds = this.mMediator.FillDataset(App.USP_CUBESTATS, App.TBL_CUBESTATS, new object[] { this.mSourceName, DateTime.Today.AddDays(-this.mDaysBack), DateTime.Now }); if (ds.Tables[App.TBL_CUBESTATS].Rows.Count > 0) { ScannerDS stats = new ScannerDS(); stats.Merge(ds); this.mCubeStatsDS.Merge(stats.CubeStatisticsTable.Select("", "DATE DESC, HOUR DESC")); } } catch (Exception ex) { throw ex; } finally { if (this.CubeStatsChanged != null) { this.CubeStatsChanged(this, EventArgs.Empty); } } }