예제 #1
0
        public List <Province> GetAll()
        {
            var result     = new List <Province>();
            var enumValues = Enum.GetValues(typeof(ProvinceFeatureEnum));

            foreach (ProvinceFeatureEnum val in enumValues)
            {
                if (val != ProvinceFeatureEnum.Undefined)
                {
                    result.Add(new Province
                    {
                        Name = CustomAttributeHelper.GetEnumDisplayValue(val)
                    });
                }
            }

            return(result);
        }
예제 #2
0
        public List <Municipality> GetAll()
        {
            var result     = new List <Municipality>();
            var enumValues = Enum.GetValues(typeof(MunicipalityFeatureEnum));

            foreach (MunicipalityFeatureEnum val in enumValues)
            {
                if (val != MunicipalityFeatureEnum.Undefined)
                {
                    result.Add(new Municipality
                    {
                        Name = CustomAttributeHelper.GetEnumDisplayValue(val)
                    });
                }
            }

            return(result.OrderBy(x => x.Name).ToList());
        }
예제 #3
0
        public List <Stage> GetAll()
        {
            var result     = new List <Stage>();
            var enumValues = Enum.GetValues(typeof(StageEnum));

            foreach (StageEnum val in enumValues)
            {
                if (val != StageEnum.Undefined)
                {
                    result.Add(new Stage
                    {
                        Id   = (int)val,
                        Name = CustomAttributeHelper.GetEnumDisplayValue(val),
                    });
                }
            }

            return(result.OrderBy(x => x.Name).ToList());
        }