AddStatusToCreateProject

This commit is contained in:
2025-05-07 13:02:05 +03:00
parent aa0362e7cc
commit 8ea68b0ca3
8 changed files with 20 additions and 2736 deletions

View File

@@ -40,6 +40,16 @@ namespace ConstructorAppUI.Controllers
[HttpGet]
public IActionResult CreateProject()
{
ViewBag.StatusList = Enum.GetValues(typeof(ProjectStatus))
.Cast<ProjectStatus>()
.Select(e => new SelectListItem
{
Value = ((int)e).ToString(), // INT OLARAK VALUE
Text = e.GetType()
.GetMember(e.ToString())
.First()
.GetCustomAttribute<DisplayAttribute>()?.Name ?? e.ToString()
}).ToList();
return View();
}