Exemple #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; // 默认采集模式是同步进行
        }
Exemple #2
0
        public static GatherEvent OffSurfaceGather(string reportName) // 注销外部采集
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);
            GatherTimer  time   = tab.GetGatherTimer();

            return(time.注销外部采集器());
        }
Exemple #3
0
        public static void LoginSurfaceGather(string reportName, GatherEvent e) // 注册外部采集
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);
            GatherTimer  time   = tab.GetGatherTimer();

            time.注册外部采集器(e);
        }
Exemple #4
0
 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);
     }
 }
Exemple #5
0
        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);
            }
        }
Exemple #6
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; // 默认采集模式是同步进行
 }