protected override void DoQuery()
        {
            base.DoQuery();

            if (this.CheckBeforeQuery())
            {
                this.AutoRefresh = this.chbRefreshAuto.Checked;

                string   compareType       = this.UCGroupConditions1.UserSelectCompareType.Trim().ToLower();
                string   byTimeType        = this.UCGroupConditions1.UserSelectByTimeType.Trim().ToLower();
                string   inputOutput       = this.UCWhereConditions1.UserSelectInputOutput.Trim().ToLower();
                object[] dateSource        = null;
                object[] dateSourceCompare = null;



                //一般数据
                dateSource = this.LoadDataSource(false, compareType.Trim().Length > 0);

                //((NewReportDomainObject)dateSource[0]).YR=((NewReportDomainObject)dateSource[0]).YR  *100%;

                if (dateSource == null || dateSource.Length <= 0)
                {
                    this.gridWebGrid.Visible   = false;
                    this.cmdGridExport.Visible = false;

                    ReportPageHelper.SetPageScrollToBottom(this);
                    return;
                }

                //环比/同期比数据
                if (compareType.Trim().Length > 0)
                {
                    dateSourceCompare = this.LoadDataSource(true, true);
                }
                if (dateSourceCompare == null)
                {
                    dateSourceCompare = new NewReportDomainObject[0] {
                    };
                }

                //获得查询的工序
                string parameterGroupCode = string.Empty;
                if (UCWhereConditions1.UserSelectGoodSemiGood.Trim() == ItemType.ITEMTYPE_FINISHEDPRODUCT)
                {
                    parameterGroupCode = "FINISHEDSTR";
                }

                if (UCWhereConditions1.UserSelectGoodSemiGood.Trim() == ItemType.ITEMTYPE_SEMIMANUFACTURE)
                {
                    parameterGroupCode = "SEMIFINISHEDSTR";
                }

                SystemSettingFacade systemSettingFacade = new SystemSettingFacade(this.DataProvider);
                Object[]            parameterList       = systemSettingFacade.GetAllParametersOrderByEattribute1(parameterGroupCode);

                if (parameterList == null)
                {
                    WebInfoPublish.Publish(this.Page, "$BS_Pelease_Maintenance_QueryOP", this.languageComponent1);
                    return;
                }

                List <string> fixedHeadOPList     = new List <string>();
                List <string> fixedHeadOPDescList = new List <string>();

                foreach (eMES.Domain.BaseSetting.Parameter parameter in parameterList)
                {
                    fixedHeadOPList.Add(parameter.ParameterAlias);
                    fixedHeadOPDescList.Add(parameter.ParameterDescription);
                }

                fixedHeadOPDescList.Add("直通率");



                //数据加载到Grid
                List <string> fixedColumnList = GetRows();
                fixedColumnList = OrderfixedColumnList(fixedColumnList);
                if (byTimeType == NewReportByTimeType.ShiftDay)
                {
                    fixedColumnList.Add("ShiftDay");
                }

                if (byTimeType == NewReportByTimeType.Week)
                {
                    fixedColumnList.Add("Week");
                }

                if (byTimeType == NewReportByTimeType.Month)
                {
                    fixedColumnList.Add("Month");
                }

                if (byTimeType == NewReportByTimeType.Year)
                {
                    fixedColumnList.Add("Year");
                }

                List <ReportGridDim3Property> dim3PropertyList = new List <ReportGridDim3Property>();

                ReportGridHelperNew reportGridHelper = new ReportGridHelperNew(this.DataProvider, this.languageComponent1, this.gridWebGrid, this.DtSource);
                reportGridHelper.DataSource                    = dateSource;
                reportGridHelper.DataSourceForCompare          = dateSourceCompare;
                reportGridHelper.Dim1PropertyList              = fixedColumnList;
                reportGridHelper.Dim3PropertyList              = dim3PropertyList;
                reportGridHelper.FixedHeadDefaultValueList     = fixedHeadOPList;
                reportGridHelper.FixedHeadDescDefaultValueList = fixedHeadOPDescList;
                reportGridHelper.HasDim3PropertyNameRowColumn  = true;
                reportGridHelper.CompareType                   = compareType;
                reportGridHelper.ByTimeType                    = byTimeType;

                reportGridHelper.ShowGridWithFixedOPHead();
                base.InitWebGrid();

                this.gridWebGrid.Behaviors.RowSelectors.RowNumbering = false;
                this.gridWebGrid.Behaviors.Sorting.Enabled           = false;

                //获取表格和图示
                if (UCDisplayConditions1.GetDisplayType().Trim().ToLower() == NewReportDisplayType.Grid)
                {
                    this.gridWebGrid.Visible   = true;
                    this.cmdGridExport.Visible = true;
                }

                ReportPageHelper.SetPageScrollToBottom(this);
            }
            else
            {
                this.chbRefreshAuto.Checked = false;
                this.AutoRefresh            = false;
            }
        }
Exemple #2
0
        private object[] GetAllStorageAttribute()
        {
            SystemSettingFacade systemSettingFacade = new SystemSettingFacade(base.DataProvider);

            return(systemSettingFacade.GetAllParametersOrderByEattribute1("STORAGEATTRIBUTE"));
        }