Example #1
0
        /// <summary>
        /// Parsing a SelectionGroup SDMX 2.1 and create Selections Where Statment
        /// </summary>
        private void ParseGroup21()
        {
            this.DateFrom   = Group21.DateFrom;
            this.DateTo     = Group21.DateTo;
            this.Selections = new List <IDataWhereStatmentSelection>();
            foreach (var item in Group21.Selections)
            {
                IDataWhereStatmentSelection dws = new DataWhereStatmentSelection()
                {
                    ComponentId = item.ComponentId
                };
                if (item.HasMultipleValues())
                {
                    //dws.Values = new List<string>();
                    //foreach (var val in item.Values)
                    //    dws.Values.Add(val.Value);

                    dws.Values = (from v in item.Values
                                  select v.Value).ToList();
                }
                else
                {
                    dws.Values = new List <string>()
                    {
                        item.Value.Value
                    }
                };

                this.Selections.Add(dws);
            }
        }
Example #2
0
        /// <summary>
        /// Parsing a SelectionGroup SDMX 2.0 and create Selections Where Statment
        /// </summary>
        private void ParseGroup20()
        {
            this.DateFrom   = Group20.DateFrom;
            this.DateTo     = Group20.DateTo;
            this.Selections = new List <IDataWhereStatmentSelection>();
            foreach (var item in Group20.Selections)
            {
                IDataWhereStatmentSelection dws = new DataWhereStatmentSelection()
                {
                    ComponentId = item.ComponentId
                };
                if (item.HasMultipleValues)
                {
                    dws.Values = item.Values.ToList <string>();
                }
                else
                {
                    dws.Values = new List <string>()
                    {
                        item.Value
                    }
                };

                this.Selections.Add(dws);
            }
        }