Ejemplo n.º 1
0
        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; // 默认采集模式是同步进行
        }
Ejemplo n.º 2
0
        public void LoadGatherInfo(GatherDataSet ds)
        {
            GatherField field = null;
            int         count = ds.GatherTB.Count;

            for (int i = 0; i < count; i++)
            {
                field             = new GatherField();
                field.DataNo      = ds.GatherTB[i].computerNo.Trim();
                field.FieldName   = ds.GatherTB[i].fieldName.Trim();
                field._Type       = (FieldDataType)ds.GatherTB[i].fieldDataType;
                field._SourceType = (数据来源类型)ds.GatherTB[i].fieldSourceType;
                this.list.Add(field);
            }
        }
Ejemplo n.º 3
0
 public void LoadGatherInfo(GatherDataSet ds)
 {
     GatherField field = null;
     int count = ds.GatherTB.Count;
     for (int i = 0; i < count; i++)
     {
         field = new GatherField();
         field.DataNo = ds.GatherTB[i].computerNo.Trim();
         field.FieldName = ds.GatherTB[i].fieldName.Trim();
         field._Type = (FieldDataType)ds.GatherTB[i].fieldDataType;
         field._SourceType = (数据来源类型)ds.GatherTB[i].fieldSourceType;
         this.list.Add(field);
     }
 }
Ejemplo n.º 4
0
 public GatherItem(GatherField field,IValue _VALUE)
 {
     this.field = field;
     this._VALUE = _VALUE;
 }
Ejemplo n.º 5
0
 public GatherItem(GatherField field, IComputerItem item)
 {
     this.field = field;
     this.item = item;
 }
Ejemplo n.º 6
0
 public GatherItem(GatherField field, IValue _VALUE)
 {
     this.field  = field;
     this._VALUE = _VALUE;
 }
Ejemplo n.º 7
0
 public GatherItem(GatherField field, IComputerItem item)
 {
     this.field = field;
     this.item  = item;
 }