Exemplo n.º 1
0
        private List <PXSqlValue> GetValuesForParsingWhenSelection()
        {
            PXSqlVariable     var            = variable;
            List <PXSqlValue> tempValuesList = new List <PXSqlValue>();

            if (this.isHierarchy)
            {
                tempValuesList = GetHierarchicalValues(rootGroup, tempValuesList);
            }
            else
            {
                if (this.mIncludeType == GroupingIncludesType.AggregatedValues)
                {
                    foreach (PXSqlGroup group in this.mGroups)
                    {
                        tempValuesList.Add(var.Values[group.ParentCode]);   //todo; sortert etter gruppe sorteringskode
                    }
                }
                else if (this.mIncludeType == GroupingIncludesType.SingleValues)
                {
                    foreach (PXSqlGroup group in this.mGroups)
                    {
                        foreach (string childCode in group.ChildCodes)
                        {
                            tempValuesList.Add(var.Values[childCode]);   //todo; sortert etter gruppe sorteringskode
                        }
                    }
                }
                else if (this.IncludeType == GroupingIncludesType.All)
                {
                    foreach (PXSqlGroup group in this.mGroups)
                    {
                        tempValuesList.Add(var.Values[group.ParentCode]);   //todo; sortert etter gruppe sorteringskode
                        foreach (string childCode in group.ChildCodes)
                        {
                            tempValuesList.Add(var.Values[childCode]);   //todo; sortert etter gruppe sorteringskode
                        }
                    }
                }
                //tempValuesList.Sort(PXSqlValue.SortByVsValue());


                //TODO; Hvorfor hadde Linja under en   if ( this.meta.MetaQuery.metaVersionLE("2.1")) { rundt seg
                tempValuesList.Sort(PXSqlValue.SortByValue());
            }

            return(tempValuesList);
        }