This commit is contained in:
@@ -41,15 +41,16 @@ namespace ConstructorAppUI.Controllers
|
||||
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()
|
||||
.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();
|
||||
}).ToList();
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user