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

View File

@ -2,19 +2,21 @@
ViewData["Title"] = "Enter"; ViewData["Title"] = "Enter";
} }
<div class="text-center"> <div class="text-center">
<h2 class="display-4">Вход в приложение</h2> <h2 class="display-4">Loggin in</h2>
</div> </div>
<form method="post"> <form method="post">
<div class="row"> <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 class="col-8"><input type="text" name="login" /></div>
</div> </div>
<div class="row"> <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 class="col-8"><input type="password" name="password" /></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-8"></div> <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> </div>
</form> </form>
<a href="/Home/Register">Register</a>

View File

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

View File

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