CourseWork/University/UniversityClientAppWorker/Views/Home/Attestations.cshtml

83 lines
2.9 KiB
Plaintext
Raw Normal View History

2024-05-28 00:44:23 +04:00
@using UniversityContracts.ViewModels
@model List<AttestationViewModel>
@{
ViewData["Title"] = "Управление аттестациями";
}
<div class="text-center">
<h2 class="display-4">@ViewData["Title"]</h2>
</div>
2024-05-28 00:44:23 +04:00
<form asp-action="CreateAttestation" method="post">
<div class="row">
2024-05-28 00:44:23 +04:00
<div class="col-4">Форма оценивания:</div>
<div class="col-8">
2024-05-28 00:44:23 +04:00
<select name="formOfEvaluation" id="formOfEvaluation" class="form-control">
<option value="Зачёт">Зачёт</option>
<option value="Экзамен">Экзамен</option>
<option value="Дифферинцируемый зачёт">Дифферинцируемый зачёт</option>
</select>
</div>
</div>
<div class="row">
2024-05-28 00:44:23 +04:00
<div class="col-4">Студент:</div>
<div class="col-8">
2024-05-28 00:44:23 +04:00
<select name="student" id="student" class="form-control" asp-items="@(new SelectList(ViewBag.Students, "Id", "Name"))"></select>
</div>
</div>
<div class="row">
2024-05-28 00:44:23 +04:00
<div class="col-4">Оценка:</div>
<div class="col-8">
<select id="score" name="score" class="form-control" asp-items="@(new SelectList(ViewBag.AttestationScore, "Score"))"></select>
</div>
</div>
<div class="row">
<div class="col-8"></div>
2024-05-28 00:44:23 +04:00
<div class="col-4 mt-2">
<input type="submit" value="Добавить аттестацию" class="btn btn-primary" />
</div>
</div>
</form>
<table class="table">
<thead>
<tr>
2024-05-28 00:44:23 +04:00
<th>Id</th>
<th>Форма оценивания</th>
<th>Студент</th>
<th>Оценка</th>
<th>Действия</th>
</tr>
</thead>
<tbody>
2024-05-28 00:44:23 +04:00
@foreach (var attestation in Model)
{
2024-05-28 00:44:23 +04:00
<tr>
<td>
@Html.DisplayFor(modelItem => attestation.Id)
</td>
<td>
@Html.DisplayFor(modelItem => attestation.FormOfEvaluation)
</td>
<td>
@Html.DisplayFor(modelItem => attestation.StudentName)
</td>
<td>
@Html.DisplayFor(modelItem => attestation.Score)
</td>
<td>
<div class="btn-group">
<a asp-controller="Home" asp-action="" asp-route-id="@attestation.Id" class="btn btn-warning">Изменить</a>
<form asp-controller="Home" asp-action="DeleteAttestation" method="post">
<input type="hidden" name="id" value="@attestation.Id" />
<button type="submit" class="btn btn-danger">Удалить</button>
</form>
</div>
</td>
</tr>
}
</tbody>
</table>