/// <summary> /// Prepares a (Paxiom) Grouping with id, and if GroupingIncludesType = All parent-child relations. /// </summary> /// <returns></returns> internal Grouping GetPaxiomGrouping() { // if (this.isHierarchy) // { // } // else // { Grouping paxGrouping = new Grouping(); paxGrouping.Name = this.GroupingId; paxGrouping.ID = this.GroupingId; // if (this.mIncludeType.Equals(GroupingIncludesType.All)) { foreach (PXSqlGroup group in this.mGroups) { Group paxGroup = new Group(); paxGroup.GroupCode = group.ParentCode;//the Name is in the value list(leaves paxGroup.Name empty) List <GroupChildValue> groupChildValueList = new List <GroupChildValue>(); foreach (String childCode in group.ChildCodes) { GroupChildValue paxGCV = new GroupChildValue(); paxGCV.Code = childCode; groupChildValueList.Add(paxGCV); } paxGroup.ChildCodes = groupChildValueList; paxGrouping.Groups.Add(paxGroup); } } //} return(paxGrouping); }
/// <summary> /// Prepares a (Paxiom) Grouping with id, and if GroupingIncludesType = All parent-child relations. /// </summary> /// <returns></returns> internal Grouping GetPaxiomGrouping() { Grouping paxGrouping = new Grouping(); paxGrouping.Name = this.GroupingId; paxGrouping.ID = this.GroupingId; // if(this.mIncludeType.Equals(GroupingIncludesType.All)) // removed for test advanced grouping px-web { foreach (PXSqlGroup group in this.mGroups) { Group paxGroup = new Group(); paxGroup.GroupCode = group.ParentCode;//the Name is in the value list(leaves paxGroup.Name empty) //paxGroup.Name = this.variable.Values[group.ParentCode].ValueTextL[meta.MainLanguageCode]; //todo piv test List <GroupChildValue> groupChildValueList = new List <GroupChildValue>(); foreach (String childCode in group.ChildCodes) { GroupChildValue paxGCV = new GroupChildValue(); paxGCV.Code = childCode; // paxGCV.Name = this.variable.Values[childCode].ValueTextL[meta.MainLanguageCode]; // todo test piv groupChildValueList.Add(paxGCV); } paxGroup.ChildCodes = groupChildValueList; paxGrouping.Groups.Add(paxGroup); } } return(paxGrouping); }