public void LoadGatherTable(GatherInfo info, GatherTimer time, IGatherItem IItem, IGatherDB db, IThreadAction _action) { this._action = _action; this._db = db; this._info = info; this.tb = db.GetDataTable(); this.临时缓存 = this.tb.Clone(); this.临时缓存.TableName = info.reportName; this.time = time; GatherItem item = null; row = new GatherRow(); int count = this.tb.Columns.Count; GatherField field = null; for (int i = 0; i < count; i++) { field = info.GetFiled(this.tb.Columns[i].ColumnName); if (field == null) { continue; } if (field._SourceType != 数据来源类型.未知) { item = new GatherItem(field, IItem.GetComputerItem(field.DataNo)); } else { item = new GatherItem(field, IItem.GetIValue(field.DataNo)); } this.row.AddItem(item); } storeType = DataStoreType.SynDB; // 默认采集模式是同步进行 }
// 加载报表信息 public static void Load(string reportName,IGatherDB db, IGatherItem IItem,int 间隔时间,int 延时时间,IThreadAction _action) { GatherInfo info = new GatherInfo(); info.reportName = reportName; GatherDataSet ds = db.GetGatherInfo(reportName); info.LoadGatherInfo(ds); GatherReport report = new GatherReport(); report.Load(reportName,db,info, IItem,间隔时间,延时时间,_action); GatherTable tab = report.GetReportTable(reportName); tab.time.采集事件 += tab.time_采集事件; tab.time.采集完成 += tab.time_采集完成; tab.time.采集开始 += tab.time_采集开始; }
// 加载报表信息 public static void Load(string reportName, IGatherDB db, IGatherItem IItem, int 间隔时间, int 延时时间, IThreadAction _action) { GatherInfo info = new GatherInfo(); info.reportName = reportName; GatherDataSet ds = db.GetGatherInfo(reportName); info.LoadGatherInfo(ds); GatherReport report = new GatherReport(); report.Load(reportName, db, info, IItem, 间隔时间, 延时时间, _action); GatherTable tab = report.GetReportTable(reportName); tab.time.采集事件 += tab.time_采集事件; tab.time.采集完成 += tab.time_采集完成; tab.time.采集开始 += tab.time_采集开始; }
public void Load(string reportName,IGatherDB db,GatherInfo info, IGatherItem IItem,int 间隔时间,int 延时时间,IThreadAction _action) { if (GatherReport._Report == null) { Init(); } GatherTimer _timer = new GatherTimer(); _timer.间隔时间 = 间隔时间; _timer.延时时间 = (uint)延时时间; GatherTable tab = new GatherTable(); tab.LoadGatherTable(info,_timer, IItem,db,_action); if (!GatherReport._Report.tb.ContainsKey(reportName)) { GatherReport._Report.tb.Add(reportName, tab); } else { GatherReport._Report.tb.Remove(reportName); GatherReport._Report.tb.Add(reportName, tab); } }
public void Load(string reportName, IGatherDB db, GatherInfo info, IGatherItem IItem, int 间隔时间, int 延时时间, IThreadAction _action) { if (GatherReport._Report == null) { Init(); } GatherTimer _timer = new GatherTimer(); _timer.间隔时间 = 间隔时间; _timer.延时时间 = (uint)延时时间; GatherTable tab = new GatherTable(); tab.LoadGatherTable(info, _timer, IItem, db, _action); if (!GatherReport._Report.tb.ContainsKey(reportName)) { GatherReport._Report.tb.Add(reportName, tab); } else { GatherReport._Report.tb.Remove(reportName); GatherReport._Report.tb.Add(reportName, tab); } }
public void LoadGatherTable(GatherInfo info, GatherTimer time, IGatherItem IItem,IGatherDB db,IThreadAction _action) { this._action = _action; this._db = db; this._info = info; this.tb = db.GetDataTable(); this.临时缓存 = this.tb.Clone(); this.临时缓存.TableName = info.reportName; this.time = time; GatherItem item = null; row = new GatherRow(); int count = this.tb.Columns.Count; GatherField field = null; for (int i = 0; i < count; i++) { field = info.GetFiled(this.tb.Columns[i].ColumnName); if (field == null) { continue; } if (field._SourceType != 数据来源类型.未知) item = new GatherItem(field, IItem.GetComputerItem(field.DataNo)); else item = new GatherItem(field, IItem.GetIValue(field.DataNo)); this.row.AddItem(item); } storeType = DataStoreType.SynDB; // 默认采集模式是同步进行 }