예제 #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; // 默认采集模式是同步进行
        }
예제 #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);
            }
        }
예제 #3
0
파일: GatherInfo.cs 프로젝트: jyorin/yinghe
 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);
     }
 }
예제 #4
0
파일: GatherItem.cs 프로젝트: jyorin/yinghe
 public GatherItem(GatherField field,IValue _VALUE)
 {
     this.field = field;
     this._VALUE = _VALUE;
 }
예제 #5
0
파일: GatherItem.cs 프로젝트: jyorin/yinghe
 public GatherItem(GatherField field, IComputerItem item)
 {
     this.field = field;
     this.item = item;
 }
예제 #6
0
 public GatherItem(GatherField field, IValue _VALUE)
 {
     this.field  = field;
     this._VALUE = _VALUE;
 }
예제 #7
0
 public GatherItem(GatherField field, IComputerItem item)
 {
     this.field = field;
     this.item  = item;
 }