UI rendberakása

This commit is contained in:
2025-04-11 10:55:40 +02:00
parent 9d107e8c0b
commit 6d276e73b8
15 changed files with 273 additions and 21 deletions
@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@@ -17,6 +19,15 @@ namespace WorkFlowCheck.Common.Helper
return displayNameAttribute?.DisplayName ?? propertyName;
}
public static string GetEnumDisplayName(this Enum enumValue)
{
return enumValue
.GetType()
.GetMember(enumValue.ToString())
.First()
.GetCustomAttribute<DisplayAttribute>()?
.Name ?? enumValue.ToString();
}
}
}