CourseWork/University/UniversityClientApp/Views/Home/Statements.cshtml

69 lines
1.7 KiB
Plaintext
Raw Normal View History

2024-05-26 22:28:34 +04:00
@using UniversityContracts.ViewModels
@model List<StatementViewModel>
@{
ViewData["Title"] = "Manage Statement Records";
}
<div class="text-center">
<h2 class="display-4">@ViewData["Title"]</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Title:</div>
<div class="col-8">
<input type="text" name="title" id="title" class="form-control" />
</div>
</div>
<div class="row">
<div class="col-4">Date:</div>
<div class="col-8">
<input type="date" name="date" id="date" class="form-control" />
</div>
</div>
<div class="row">
<div class="col-4">Teacher:</div>
<div class="col-8">
<select id="teacherId" name="teacherId" class="form-control" asp-items="ViewBag.Teachers"></select>
</div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4">
<input type="submit" value="Create Statement Record" class="btn btn-primary" />
</div>
</div>
</form>
<table class="table">
<thead>
<tr>
2024-05-26 22:28:34 +04:00
<th>Id</th>
<th>Title</th>
<th>Date</th>
<th>Teacher</th>
</tr>
</thead>
2024-05-26 22:28:34 +04:00
<tbody>@foreach (var item in Model)
{
2024-05-26 22:28:34 +04:00
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Date)
</td>
<td>
2024-05-26 22:28:34 +04:00
@Html.DisplayFor(modelItem => item.TeacherId)
</td>
2024-05-26 22:28:34 +04:00
</tr>
}
</tbody>
</table>