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 void AddItem(GatherItem item) { this.List.Add(item); }
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; // 默认采集模式是同步进行 }