Esempio n. 1
0
        public static int GetDbValue(this OwnAttributeEnum parameter)
        {
            var attributes = (EnumExtension[])parameter.GetType().GetField(parameter.ToString()).GetCustomAttributes(
                typeof(EnumExtension), false);

            return(attributes.Length > 0 ? attributes[0].DbValue : -1);
        }
Esempio n. 2
0
        public static string GetDescription(this OwnAttributeEnum parameter)
        {
            var attributes = (EnumExtension[])parameter.GetType().GetField(parameter.ToString()).GetCustomAttributes(
                typeof(EnumExtension), false);

            return(attributes.Length > 0 ? attributes[0].GetBezeichnung() : string.Empty);
        }