Beispiel #1
0
        //private bool mTableContainsMetaOnly;
        #endregion props


        #region  contructor
        public PXSqlVariableTime(MainTableVariableRow aTVRow, PXSqlMeta_22 meta)
            : base(aTVRow.Variable, meta, false, true, false)
        {
            mStoreColumnNo = int.Parse(aTVRow.StoreColumnNo);
            if (!meta.ConstructedFromPxs)
            {
                mIndex = mStoreColumnNo;
            }
            SetSelected();
            SetPresText();
            SetDefaultPresTextOption();
            SetTimeValues();
            mTimeScale = new PXSqlTimeScale(meta.MetaQuery.GetTimeScaleRow(meta.MainTable.TimeScale), meta.Config);
            SetTimeVal();
            PossiblyResetPresText();
        }
        //     public PXSqlVariableClassification() { }


        public PXSqlVariableClassification(MainTableVariableRow aTVRow, PXSqlMeta_22 meta)
            : base(aTVRow.Variable, meta, false, false, true)
        {
            if (this.meta.ConstructedFromPxs)
            {
                foreach (PQVariable tmpVar in this.meta.PxsFile.Query.Variables)
                {
                    if (this.Name == tmpVar.code)
                    {
                        this.pxsQueryVariable = tmpVar;
                    }
                }
            }
            SetSelected();

            if (this.isSelected)
            {
                this.mStoreColumnNo = int.Parse(aTVRow.StoreColumnNo);
                if (!this.meta.ConstructedFromPxs)
                {
                    this.mIndex = this.mStoreColumnNo;
                }

                SetValueset();
                SetValuePool();
                SetPresText();
                SetDefaultPresTextOption(); // would be overwritten if options set in pxs
                if (this.meta.ConstructedFromPxs)
                {
                    SetOptionsFromPxs();
                }

                if (this.meta.inSelectionModus)
                {
                    this.groupingInfos = new PXSqlGroupingInfos(this.meta, this.Name, valusetIds);
                }
            }
            else
            {
                SetValueset();
            }
            //  Elimination must be done after SetValues moved down.
            //   if (this.meta.InstanceModus == Instancemodus.selection)
            //       SetElimForSelection();
            //   else
            //       SetElimForPresentation();



            if (this.aggregationType.Equals("G"))
            {
                if (String.IsNullOrEmpty(this.aggregatingStructureId))
                {
                    throw new ApplicationException("Not implemented yet");
                }
                else if (this.aggregatingStructureId.Equals("UNKNOWNSTRUCTUREID"))
                {
                    List <PXSqlGroup> groupFromFile = GetListOfGroupFromPxs();

                    currentGrouping = new PXSqlGrouping(this.meta, this, groupFromFile);
                }
                else
                {
                    currentGrouping = new PXSqlGrouping(this.metaQuery.GetGroupingRow(this.aggregatingStructureId), this.meta, this, this.pxsQueryVariable.GetCodesNoWildcards());
                }
            }
            else
            {
                SetValues();
                SetCodelists();
            }
            if (this.meta.inSelectionModus)
            {
                SetElimForSelection();
            }
            else
            {
                SetElimForPresentation();
            }
        }