RoleCheckPoint

This commit is contained in:
2025-03-31 11:55:24 +02:00
parent d7c198acfa
commit 56f17681be
26 changed files with 1511 additions and 20 deletions
@@ -1,7 +1,11 @@
using Newtonsoft.Json;
using Microsoft.AspNetCore.Mvc.Rendering;
using Newtonsoft.Json;
using Serilog;
using System.ComponentModel.DataAnnotations;
using System.Net.Http;
using System.Reflection;
using WorkFlowCheck.Common.DTO;
using WorkFlowCheck.Common.Enums;
using WorkFlowCheck.Web.Services.Interfaces;
namespace WorkFlowCheck.Web.Services
@@ -200,6 +204,24 @@ namespace WorkFlowCheck.Web.Services
};
}
}
public List<SelectListItem> GetCheckStatus()
{
return Enum.GetValues(typeof(CheckStatus))
.Cast<CheckStatus>()
.Select(e => new SelectListItem
{
Value = ((int)e).ToString(),
Text = GetEnumDisplayName(e)
}).ToList();
}
private string GetEnumDisplayName(Enum enumValue)
{
return enumValue.GetType()
.GetMember(enumValue.ToString())
.First()
.GetCustomAttribute<DisplayAttribute>()?.Name ?? enumValue.ToString();
}
}
}