This commit is contained in:
GokaPek 2024-05-26 22:28:34 +04:00
parent df552c39e1
commit a939803e8c
4 changed files with 37 additions and 38 deletions

View File

@ -19,6 +19,11 @@ namespace UniversityClientApp.Controllers
public IActionResult Index()
{
if (APIStorekeeper.Client == null)
{
return Redirect("~/Home/Enter");
}
//return View(APIStorekeeper.GetRequest<List<OrderViewModel>>($"api/main/getorders?clientId={APIClient.Client.Id}"));
return View();
}

View File

@ -2,19 +2,21 @@
ViewData["Title"] = "Enter";
}
<div class="text-center">
<h2 class="display-4">Вход в приложение</h2>
<h2 class="display-4">Loggin in</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Логин:</div>
<div class="col-4">Login:</div>
<div class="col-8"><input type="text" name="login" /></div>
</div>
<div class="row">
<div class="col-4">Пароль:</div>
<div class="col-4">Password:</div>
<div class="col-8"><input type="password" name="password" /></div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Вход" class="btn btnprimary" /></div>
<div class="col-4"><input type="submit" value="Submit" class="btn btnprimary" /></div>
</div>
</form>
<a href="/Home/Register">Register</a>

View File

@ -3,17 +3,6 @@
}
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Log in</h3>
<a href="/Home/Enter">Enter</a>
<a href="/Home/Register">Register</a>
return;
}
}
<div class="menu">
<a href="/Home/Disciplines">Disciplines</a>
<a href="/Home/Teachers">Teachers</a>
@ -23,6 +12,4 @@
<div class="header">
<img src="" alt="Logo" class="logo">
</div>
</div>

View File

@ -1,4 +1,6 @@
@{
@using UniversityContracts.ViewModels
@model List<StatementViewModel>
@{
ViewData["Title"] = "Manage Statement Records";
}
@ -38,26 +40,29 @@
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Title</th>
<th>Date</th>
<th>Teacher</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@* @foreach (var record in Model)
<tbody>@foreach (var item in Model)
{
<tr>
<td>@record.Title</td>
<td>@record.Date.ToString("d")</td>
<td>@record.Teacher.Name</td>
<td>
<a asp-action="Edit" asp-route-id="@record.Id" class="btn btn-warning">Edit</a>
<a asp-action="Details" asp-route-id="@record.Id" class="btn btn-info">Details</a>
<a asp-action="Delete" asp-route-id="@record.Id" class="btn btn-danger">Delete</a>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Date)
</td>
<td>
@Html.DisplayFor(modelItem => item.TeacherId)
</td>
</tr>
} *@
}
</tbody>
</table>