AddStatusToCreateProject
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user