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();
}

View File

@@ -83,7 +83,13 @@
<input type="file" class="form-control" name="FloorPlanFile" id="FloorPlanFile">
<span asp-validation-for="FloorPlanUrl" class="text-danger"></span>
</div>
<div class="form-group">
<label for="Status">Proje Durumu</label>
<select asp-for="Status" class="form-control" asp-items="@(ViewBag.StatusList as List<SelectListItem>)">
<option value="">Durum Seçiniz</option>
</select>
<span asp-validation-for="Status" class="text-danger"></span>
</div>
</div>
</div>
</div>