Exemplo n.º 1
0
        public static SelectList ItemTypeEnumListForSpecificItemCategoryDropDown(ItemCategoryEnum itemCategoryEnum)
        {
            var itemTypeEnumList = (from ItemTypeEnum es in Enum.GetValues(typeof(ItemTypeEnum))
                                    where (EnumHelpers.GetCategory((ItemTypeEnum)es) == itemCategoryEnum.ToString())
                                    select new
            {
                Id = es,
                Name = EnumHelpers.GetDescription((ItemTypeEnum)es)
            });

            return(new SelectList(itemTypeEnumList, "Id", "Name"));
        }