コード例 #1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="rdf">传给父类Base2TempTable的构造函数的参数</param>
 /// <param name="customDataSource">自定义数据源对象,其作用主要产生和传输临时表名称</param>
 /// <param name="dataSourceId">数据引擎中数据源的标识</param>
 /// <param name="functionName">数据引擎中数据源的查询函数</param>
 /// <param name="filterSrv">过滤条件信息对象</param>
 public U8DataEngine2TempTable(
     ReportDataFacade rdf,
     CustomDataSource customDataSource,
     string dataSourceId,
     string functionName,
     FilterSrv filterSrv,
     string extendingDataSourceTempDBName)
     : base(rdf, customDataSource)
 {
     this._filterSrv          = filterSrv;
     this._u8DataEngineHelper = new U8DataEngineHelper(
         dataSourceId,
         functionName,
         customDataSource.FilterString,
         rdf._U8LoginInfor,
         extendingDataSourceTempDBName);
     this._u8DataEngineHelper.ReadConfigurate();
 }
コード例 #2
0
ファイル: Class1.cs プロジェクト: kkmeteor/StudyProjects
        public void Prepaint(Report report, RowData data, Cell innercell, FilterSrv filter, AgileArgs args, DataHelper datahelper, ReportSummaryData reportsummary, RowBalance rowbalance, AccumulateData accumulate, BalanceData balance, object[] others)
        {
            Current current      = null;
            int     grouplevels  = report.GroupLevels;
            int     currentindex = -1;
            int     startindex   = -1;
            Groups  groups       = null;
            Group   currentgroup = null;
            RowData columntodata = null;
            Current previous     = new Current(rowbalance);

            if (rowbalance != null)
            {
                currentindex = rowbalance.CurrentIndex;
                startindex   = rowbalance.StartIndex;
            }
            SemiRow       cells      = (data != null ? data.SemiRow : null);
            SemiRow       row        = cells;
            IKeyToObject  nametodata = cells as IKeyToObject;
            StimulateCell cell       = new StimulateCell(innercell);

            if (data is Group)
            {
                cell.bInGroup = true;
                currentgroup  = data as Group;
                columntodata  = currentgroup;
            }
            else if (!(data is ReportSummaryData))
            {
                current      = new Current(data);
                columntodata = data;
            }
            else
            {
                cell.bInReportSummary = true;
                columntodata          = data;
            }
            if (nametodata == null)
            {
                nametodata = columntodata as IKeyToObject;
            }
            Global global;

            if (datahelper.Global == null)
            {
                global            = new Global();
                global.DataHelper = datahelper;
                datahelper.Global = global;
            }
            else
            {
                global = datahelper.Global as Global;
            }
            if (Convert.ToDouble(reportsummary["不良品数量"]) == 0)
            {
                cell.Caption = 0;
                return;
            }
            if (current != null)
            {
                cell.Caption = Convert.ToDouble(current["不良品数量"]) / Convert.ToDouble(reportsummary["不良品数量"]);
            }
            else if (currentgroup != null)
            {
                cell.Caption = Convert.ToDouble(currentgroup["不良品数量"]) / Convert.ToDouble(reportsummary["不良品数量"]);
            }
            else
            {
                cell.Caption = 1;
            }
        }