Esempio n. 1
0
        public static DataView LoadGrid(控件库.表格控件.Grid _Grid, string tbName, string Fliter, string sort, bool order)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(tbName);

            DevExpress.XtraEditors.Repository.RepositoryItemTextEdit text = null;
            for (int i = 0; i < _Grid.ExportBandView.Columns.Count; i++)
            {
                text = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();

                _Grid.ExportBandView.Columns[i].ColumnEdit = text;
                _Grid.ExportBandView.Columns[i].OptionsColumn.AllowEdit = true;
                tab.计算列准备(_Grid.ExportBandView.Columns[i].FieldName, _Grid, text);
            }
            DataTable tb2 = GetReportTable(tbName);

            if (order)
            {
                tb2.Columns.Add("序号", typeof(int));
            }
            DataView view = new DataView(tb2, Fliter, sort, DataViewRowState.CurrentRows);

            if (order)
            {
                SetOrder(view);
            }
            _Grid.SetDataSource(view);
            return(view);
        }
Esempio n. 2
0
        public static void RemoveRecord(decimal id, string reportName)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);

            tab.RemoveRecord(id, reportName);
        }
Esempio n. 3
0
        public static DataTable GetReportTable(string reportName)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);

            return(tab.Cache);
        }
Esempio n. 4
0
        public static void AddRowEvent(string reportName, IGatherRow Irow)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);

            tab.GatherRowEvent = Irow;
        }
Esempio n. 5
0
        public static void HandGather(string reportName)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);

            tab.AddArrToDB();
        }
Esempio n. 6
0
        public static void UpdateToDB(string reportName) // 更新表到数据库
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);

            tab.UpdateToDB(reportName);
        }
Esempio n. 7
0
        public static void GatherStorePattern(string reportName, DataStoreType type) // 采集存储模式
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);

            tab.采集模式(type);
        }
Esempio n. 8
0
        public static void EndGather(string reportName)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);

            tab.time.关闭采集();
        }
Esempio n. 9
0
        public static void EditTime(string reportName, int 间隔时间)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);

            tab.修改时间间隔(间隔时间);
        }
Esempio n. 10
0
        public static void GatherComplete(IGatherComplete _complete, string reportName)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);

            tab.GatherComplete = _complete;
        }
Esempio n. 11
0
        public static void TableComputer(string tbName, string FiledName, ITableComputer computer)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(tbName);

            tab.加载计算列(FiledName, computer);
        }
Esempio n. 12
0
        public static GatherEvent OffSurfaceGather(string reportName) // 注销外部采集
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);
            GatherTimer  time   = tab.GetGatherTimer();

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

            time.注册外部采集器(e);
        }
Esempio n. 14
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_采集开始;
 }
Esempio n. 15
0
        public static void LoadGrid(控件库.表格控件.Grid _Grid,string tbName)
        {
            GatherReport report = new GatherReport();
            GatherTable tab = report.GetReportTable(tbName);
            DevExpress.XtraEditors.Repository.RepositoryItemTextEdit text = null;
            for (int i = 0; i < _Grid.ExportBandView.Columns.Count; i++)
            {
                text = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();

                _Grid.ExportBandView.Columns[i].ColumnEdit = text;
                _Grid.ExportBandView.Columns[i].OptionsColumn.AllowEdit = true;
                tab.计算列准备(_Grid.ExportBandView.Columns[i].FieldName, _Grid, text);
            }
            DataTable tb2 = GetReportTable(tbName);
            _Grid.SetDataSource(tb2);
        }
Esempio n. 16
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_采集开始;
        }
Esempio n. 17
0
        public static void LoadGrid(控件库.表格控件.Grid _Grid, string tbName)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(tbName);

            DevExpress.XtraEditors.Repository.RepositoryItemTextEdit text = null;
            for (int i = 0; i < _Grid.ExportBandView.Columns.Count; i++)
            {
                text = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();

                _Grid.ExportBandView.Columns[i].ColumnEdit = text;
                _Grid.ExportBandView.Columns[i].OptionsColumn.AllowEdit = true;
                tab.计算列准备(_Grid.ExportBandView.Columns[i].FieldName, _Grid, text);
            }
            DataTable tb2 = GetReportTable(tbName);

            _Grid.SetDataSource(tb2);
        }
Esempio n. 18
0
 public void Init()
 {
     tb = new System.Collections.Hashtable();
     GatherReport._Report = this;
 }
Esempio n. 19
0
 public static void HandGather(string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.AddArrToDB();
 }
Esempio n. 20
0
 public static DataTable GetReportTable(string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     return tab.Cache;
 }
Esempio n. 21
0
 // 采集存储模式
 public static void GatherStorePattern(string reportName,DataStoreType type)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.采集模式(type);
 }
Esempio n. 22
0
 public static void GatherComplete(IGatherComplete _complete,string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.GatherComplete = _complete;
 }
Esempio n. 23
0
 public static void EndGather(string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.time.关闭采集();
 }
Esempio n. 24
0
 public static void EditTime(string reportName,int 间隔时间)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.修改时间间隔(间隔时间);
 }
Esempio n. 25
0
 // 更新表到数据库
 public static void UpdateToDB(string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.UpdateToDB(reportName);
 }
Esempio n. 26
0
 public static void TableComputer(string tbName,string FiledName,ITableComputer computer)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(tbName);
     tab.加载计算列(FiledName, computer);
 }
Esempio n. 27
0
 public static void AddRowEvent(string reportName, IGatherRow Irow)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.GatherRowEvent = Irow;
 }
Esempio n. 28
0
 public static void RemoveRecord(decimal id, string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.RemoveRecord(id, reportName);
 }
Esempio n. 29
0
 // 注销外部采集
 public static GatherEvent OffSurfaceGather(string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     GatherTimer time = tab.GetGatherTimer();
     return time.注销外部采集器();
 }
Esempio n. 30
0
        public static DataView LoadGrid(控件库.表格控件.Grid _Grid, string tbName, string Fliter,string sort,bool order)
        {
            GatherReport report = new GatherReport();
            GatherTable tab = report.GetReportTable(tbName);
            DevExpress.XtraEditors.Repository.RepositoryItemTextEdit text = null;
            for (int i = 0; i < _Grid.ExportBandView.Columns.Count; i++)
            {
                text = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();

                _Grid.ExportBandView.Columns[i].ColumnEdit = text;
                _Grid.ExportBandView.Columns[i].OptionsColumn.AllowEdit = true;
                tab.计算列准备(_Grid.ExportBandView.Columns[i].FieldName, _Grid, text);
            }
            DataTable tb2 = GetReportTable(tbName);
            if (order)
                tb2.Columns.Add("序号", typeof(int));
               DataView view = new DataView(tb2, Fliter,sort, DataViewRowState.CurrentRows);
               if (order)
               SetOrder(view);
            _Grid.SetDataSource(view);
            return view;
        }
Esempio n. 31
0
 public void Init()
 {
     tb = new System.Collections.Hashtable();
     GatherReport._Report = this;
 }
Esempio n. 32
0
 // 注册外部采集
 public static void LoginSurfaceGather(string reportName,GatherEvent e)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     GatherTimer time = tab.GetGatherTimer();
     time.注册外部采集器(e);
 }