2024-05-27 17:32:21 +04:00
|
|
|
@using UniversityContracts.ViewModels
|
|
|
|
@model List<StudentViewModel>
|
|
|
|
@{
|
2024-05-27 22:35:38 +04:00
|
|
|
ViewData["Title"] = "Управление студентами";
|
2024-04-29 19:06:11 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
<h2 class="display-4">@ViewData["Title"]</h2>
|
|
|
|
</div>
|
|
|
|
|
2024-05-27 22:35:38 +04:00
|
|
|
<form asp-action="CreateStudent" method="post">
|
2024-04-29 19:06:11 +04:00
|
|
|
<div class="row">
|
2024-05-27 22:35:38 +04:00
|
|
|
<div class="col-4">ФИО:</div>
|
2024-04-29 19:06:11 +04:00
|
|
|
<div class="col-8">
|
|
|
|
<input type="text" name="name" id="name" class="form-control" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2024-05-27 22:35:38 +04:00
|
|
|
<div class="col-4">План обучения:</div>
|
2024-04-29 19:06:11 +04:00
|
|
|
<div class="col-8">
|
2024-05-27 22:35:38 +04:00
|
|
|
<select name="planOfStudy" id="planOfStudy" class="form-control" asp-items="@(new SelectList(ViewBag.PlanOfStudys, "Id", "Profile"))"></select>
|
2024-04-29 19:06:11 +04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2024-05-27 22:35:38 +04:00
|
|
|
<div class="col-4">Номер телефона:</div>
|
2024-04-29 19:06:11 +04:00
|
|
|
<div class="col-8">
|
2024-05-30 00:22:02 +04:00
|
|
|
<input id="phoneNumber" name="phoneNumber" class="form-control"></input>
|
2024-04-29 19:06:11 +04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-8"></div>
|
2024-05-27 22:35:38 +04:00
|
|
|
<div class="col-4 mt-2">
|
|
|
|
<input type="submit" value="Добавить студента" class="btn btn-primary" />
|
2024-04-29 19:06:11 +04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2024-05-27 17:32:21 +04:00
|
|
|
<th>Id</th>
|
2024-05-27 22:35:38 +04:00
|
|
|
<th>ФИО</th>
|
|
|
|
<th>План обучения</th>
|
|
|
|
<th>Номер телефона</th>
|
|
|
|
<th>Действия</th>
|
2024-04-29 19:06:11 +04:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2024-05-27 17:32:21 +04:00
|
|
|
@foreach (var student in Model)
|
2024-04-29 19:06:11 +04:00
|
|
|
{
|
|
|
|
<tr>
|
|
|
|
<td>
|
2024-05-27 17:32:21 +04:00
|
|
|
@Html.DisplayFor(modelItem => student.Id)
|
2024-04-29 19:06:11 +04:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-05-27 17:32:21 +04:00
|
|
|
@Html.DisplayFor(modelItem => student.Name)
|
|
|
|
</td>
|
|
|
|
<td>
|
2024-05-30 00:22:02 +04:00
|
|
|
@Html.DisplayFor(modelItem => student.PlanOfStudyProfile)
|
2024-05-27 17:32:21 +04:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => student.PhoneNumber)
|
|
|
|
</td>
|
|
|
|
<td>
|
2024-05-27 22:35:38 +04:00
|
|
|
<div class="btn-group">
|
2024-05-30 00:22:02 +04:00
|
|
|
<a asp-controller="Home" asp-action="InfoStudent" asp-route-id="@student.Id" class="btn btn-warning">Изменить</a>
|
|
|
|
<form asp-controller="Home" asp-action="DeleteStudent" method="post">
|
2024-05-27 22:35:38 +04:00
|
|
|
<input type="hidden" name="id" value="@student.Id" />
|
|
|
|
<button type="submit" class="btn btn-danger">Удалить</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
2024-04-29 19:06:11 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
2024-05-27 17:32:21 +04:00
|
|
|
}
|
2024-04-29 19:06:11 +04:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|