コード例 #1
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);
            }
        }
コード例 #2
0
        // 加载报表信息
        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_采集开始;
        }