2024-05-26 23:51:13 +04:00
|
|
|
@using UniversityContracts.ViewModels
|
|
|
|
@model List<TeacherViewModel>
|
|
|
|
@{
|
2024-05-30 02:30:33 +04:00
|
|
|
ViewData["Title"] = "Преподаватели";
|
2024-04-28 16:30:27 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
<h2 class="display-4">@ViewData["Title"]</h2>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<form method="post">
|
|
|
|
<div class="row">
|
2024-05-30 02:30:33 +04:00
|
|
|
<div class="col-4">Имя:</div>
|
2024-04-28 16:30:27 +04:00
|
|
|
<div class="col-8">
|
|
|
|
<input type="text" name="name" id="name" class="form-control" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2024-05-30 02:30:33 +04:00
|
|
|
<div class="col-4">Учёная степень:</div>
|
2024-04-28 16:30:27 +04:00
|
|
|
<div class="col-8">
|
|
|
|
<input type="text" name="academicDegree" id="academicDegree" class="form-control" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2024-05-30 02:30:33 +04:00
|
|
|
<div class="col-4">Должность:</div>
|
2024-04-28 16:30:27 +04:00
|
|
|
<div class="col-8">
|
|
|
|
<input type="text" name="position" id="position" class="form-control" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-8"></div>
|
|
|
|
<div class="col-4">
|
2024-05-30 05:16:33 +04:00
|
|
|
<input type="submit" value="Создать преподавателя" class="btn btn-primary" />
|
2024-04-28 16:30:27 +04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2024-05-26 23:51:13 +04:00
|
|
|
<th>Id</th>
|
2024-05-30 02:30:33 +04:00
|
|
|
<th>Имя</th>
|
|
|
|
<th>Учёная степень</th>
|
|
|
|
<th>Должность</th>
|
2024-05-30 03:23:27 +04:00
|
|
|
<th>Действия</th>
|
2024-04-28 16:30:27 +04:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2024-05-26 23:51:13 +04:00
|
|
|
<tbody>
|
|
|
|
@foreach (var item in Model)
|
2024-04-28 16:30:27 +04:00
|
|
|
{
|
|
|
|
<tr>
|
|
|
|
<td>
|
2024-05-26 23:51:13 +04:00
|
|
|
@Html.DisplayFor(modelItem => item.Id)
|
2024-04-28 16:30:27 +04:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-05-26 23:51:13 +04:00
|
|
|
@Html.DisplayFor(modelItem => item.Name)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.AcademicDegree)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.Position)
|
2024-04-28 16:30:27 +04:00
|
|
|
</td>
|
2024-05-30 03:23:27 +04:00
|
|
|
<td>
|
|
|
|
<div class="btn-group">
|
|
|
|
<a asp-controller="Home" asp-action="InfoTeacher" asp-route-id="@item.Id" class="btn btn-warning">Изменить</a>
|
|
|
|
<form asp-controller="Home" asp-action="DeleteTeacher" method="post">
|
|
|
|
<input type="hidden" name="id" value="@item.Id" />
|
|
|
|
<button type="submit" class="btn btn-danger">Удалить</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</td>
|
2024-04-28 16:30:27 +04:00
|
|
|
</tr>
|
2024-05-26 23:51:13 +04:00
|
|
|
}
|
2024-04-28 16:30:27 +04:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|