Example #1
0
        private IEnumerable <DropDown> GetMeasurements()
        {
            var             measurement         = receiver.GetMeasurements();
            List <DropDown> dropDownMeasurement = new List <DropDown>();

            dropDownMeasurement.Add(new DropDown {
                Name = "--Select--", Value = "0"
            });
            if (measurement.Any())
            {
                dropDownMeasurement.AddRange(measurement.Select(x => new DropDown {
                    Name = x.MeasurmentName, Value = x.MeasurmentId.ToString()
                }).ToList());
            }
            return(dropDownMeasurement);
        }