SUBD/ForumUserApp/Views/Home/HardRequest.cshtml
2023-05-10 20:57:06 +04:00

70 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using ForumContracts.ViewModels
@model List<QuestionViewModel>
@{
ViewData["Title"] = "HardRequest Page";
}
<div class="text-center">
<h1 class="display-4">Выборка вопросов</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<form method="post">
<div class="row">
<div class="col-4">С:</div>
<div class="col-8"><input type="date" name="dateFrom" /></div>
</div>
<div class="row">
<div class="col-4">По:</div>
<div class="col-8"><input type="date" name="dateTo" /></div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Показать" class="btn btn-primary" /></div>
</div>
</form>
<table class="table">
<thead>
<tr>
<th>
Дата создания
</th>
<th>
Категория вопроса
</th>
<th>
Вопрос
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.CreateDate)
</td>
<td>
@Html.DisplayFor(modelItem => item.CategoryName)
</td>
<td>
@Html.DisplayFor(modelItem => item.QuestionDes)
</td>
</tr>
}
</tbody>
</table>
}
</div>