Впереди еще еще предстоит много разбираться этим ASP.Net

This commit is contained in:
Kirill 2024-05-02 00:58:39 +04:00
parent d968186d78
commit 291605b6e1
5 changed files with 102 additions and 5 deletions

View File

@ -12,6 +12,10 @@ namespace SchoolApp.Controllers
{
_logger = logger;
}
public IActionResult Enter()
{
return View();
}
public IActionResult Register()
{

View File

@ -0,0 +1,35 @@

@{
ViewData["Title"] = "Enter";
}
<div class="text-center">
<h2 class="u-text u-text-custom-color-1 u-text-default u-text-1"> Вход </h2>
</div>
<div class="container">
<form>
<section class="row">
<div class="col-lg-3">
</div>
<div class="col-lg-6">
<h3 class="title-h3">Введите имя</h3>
<article class="form-section">
<label class="text-field-label" for="name-element">Имя</label>
<input class="text-field-input" type="text" required name="name-element" placeholder="Имя">
</article>
<h3 class="title-h3">Введите пароль</h3>
<article class="form-section">
<label class="text-field-label" for="date-element">Пароль</label>
<input class="text-field-input" type="password" required name="password-element">
</article>
<article>
<label class="submit-button-label">Кнопка отправки</label>
<input class="submit-button" type="submit" name="submit-button" value="Войти">
</article>
</div>
<div class="col-lg-3">
</div>
</section>
</form>
</div>

View File

@ -1,8 +1,63 @@
@{
ViewData["Title"] = "Home Page";
@using SchoolContracts.ViewModels
@model List<LessonViewModel>
@{
ViewData["Title"] = "Home Page";
}
<div class="text-center">
<h1 class="display-4">Welcome</h1>
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
<h1 class="display-4">Занятия</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<p>
<a asp-action="UpdatePatient">Редактировать занятие</a>
<a asp-action="DeletePatient">Удалить занятие</a>
<a asp-action="ServiceVisits">Связать занятие и интерес</a>
</p>
<p>
<a asp-action="CreatePatient">Создать занятие</a>
</p>
<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.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.TimeStart)
</td>
<td>
@Html.DisplayFor(modelItem => item.TimeEnd)
</td>
</tr>
}
</tbody>
</table>
}
</div>

View File

@ -42,6 +42,10 @@
<label class="text-field-label" for="description-element">Описание элемента</label>
<textarea class="text-field-textarea" type="text" name="description-element" placeholder="Описание"></textarea>
</article>
<article>
<label class="submit-button-label">Кнопка отправки</label>
<input class="submit-button" type="submit" name="submit-button" value="Добавить пользователя">
</article>
</div>
<div class="col-lg-3">
</div>

View File

@ -29,7 +29,6 @@ body {
flex-direction: column;
padding: 15px 20px;
margin: 20px 0;
;
background: linear-gradient(135deg, #161616, #fff);
border-radius: 20px;
}