Exemplo 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);
        }
Exemplo n.º 2
0
        public static void RemoveRecord(decimal id, string reportName)
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);

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

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

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

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

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

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

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

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

            tab.GatherComplete = _complete;
        }
Exemplo 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);
        }
Exemplo n.º 12
0
        public static GatherEvent OffSurfaceGather(string reportName) // 注销外部采集
        {
            GatherReport report = new GatherReport();
            GatherTable  tab    = report.GetReportTable(reportName);
            GatherTimer  time   = tab.GetGatherTimer();

            return(time.注销外部采集器());
        }
Exemplo 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);
        }
Exemplo 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_采集开始;
 }
Exemplo 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);
        }
Exemplo 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_采集开始;
        }
Exemplo 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);
        }
Exemplo n.º 18
0
 public void Init()
 {
     tb = new System.Collections.Hashtable();
     GatherReport._Report = this;
 }
Exemplo n.º 19
0
 public static void HandGather(string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.AddArrToDB();
 }
Exemplo n.º 20
0
 public static DataTable GetReportTable(string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     return tab.Cache;
 }
Exemplo n.º 21
0
 // 采集存储模式
 public static void GatherStorePattern(string reportName,DataStoreType type)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.采集模式(type);
 }
Exemplo n.º 22
0
 public static void GatherComplete(IGatherComplete _complete,string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.GatherComplete = _complete;
 }
Exemplo n.º 23
0
 public static void EndGather(string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.time.关闭采集();
 }
Exemplo n.º 24
0
 public static void EditTime(string reportName,int 间隔时间)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.修改时间间隔(间隔时间);
 }
Exemplo n.º 25
0
 // 更新表到数据库
 public static void UpdateToDB(string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.UpdateToDB(reportName);
 }
Exemplo 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);
 }
Exemplo n.º 27
0
 public static void AddRowEvent(string reportName, IGatherRow Irow)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.GatherRowEvent = Irow;
 }
Exemplo n.º 28
0
 public static void RemoveRecord(decimal id, string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     tab.RemoveRecord(id, reportName);
 }
Exemplo n.º 29
0
 // 注销外部采集
 public static GatherEvent OffSurfaceGather(string reportName)
 {
     GatherReport report = new GatherReport();
     GatherTable tab = report.GetReportTable(reportName);
     GatherTimer time = tab.GetGatherTimer();
     return time.注销外部采集器();
 }
Exemplo 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;
        }
Exemplo n.º 31
0
 public void Init()
 {
     tb = new System.Collections.Hashtable();
     GatherReport._Report = this;
 }
Exemplo 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);
 }