internal void ApplyValueSet(string valueSetId) { this.currentGrouping = null; this.selectedValueset = valueSetId; SetElimForSelection(); SetDefaultPresTextOption(); //TODO; }
/// <summary>Started from GUI via builder, a grouping is applied.</summary> /// <param name="paxiomVariable">the paxiom Variable </param> /// <param name="groupingId">The id of the grouping</param> /// <param name="include">Emun value inducating what the new codelist should include:parents,childern or both </param> internal void ApplyGrouping(Variable paxiomVariable, string groupingId, GroupingIncludesType include) { paxiomVariable.RecreateValues(); // per inge values for variable must be deleted before created for new valueset. paxiomVariable.Hierarchy.Clear(); // must clear hierarchies. this.currentGrouping = new PXSqlGrouping(this.metaQuery.GetGroupingRow(groupingId), meta, this, include); this.selectedValueset = PXSqlKeywords.FICTIONAL_ID_ALLVALUESETS; //todo; or should it be valuset for vsgroup? //was SetElimForSelection(); //TODO How should elimination for groups be? // SetDefaultPresTextOption(); this.PaxiomElimination = PXConstant.NO; this.PresTextOption = this.ValuePool.ValuePres; //send new state to paxiom: paxiomVariable.CurrentGrouping = this.currentGrouping.GetPaxiomGrouping(); }
// public PXSqlVariableClassification() { } public PXSqlVariableClassification(MainTableVariableRow aTVRow, PXSqlMeta_23 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(); } SetMetaIdFromAllGroupings(); if (this.meta.inSelectionModus) { SetElimForSelection(); } else { SetElimForPresentation(); } }