Формы открываются

This commit is contained in:
Artyom_Yashin 2024-05-01 22:17:29 +04:00
parent 852cb2e9a7
commit cdf8bb4b28
14 changed files with 84 additions and 72 deletions

View File

@ -6,12 +6,6 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Content Remove="Views\Home\CardCreate.cshtml" />
<Content Remove="Views\Home\Register.cshtml" />
<Content Remove="Views\Home\Requests.cshtml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
@ -22,28 +16,4 @@
<ProjectReference Include="..\BankDatabaseImplement\BankDatabaseImplement.csproj" />
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Remove="Views\Home\CardCreate.cshtml" />
</ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="Views\Home\CardCreate.cshtml" />
<_ContentIncludedByDefault Remove="Views\Home\Register.cshtml" />
<_ContentIncludedByDefault Remove="Views\Home\Requests.cshtml" />
</ItemGroup>
<ItemGroup>
<None Include="Views\Home\CardCreate.cshtml" />
<None Include="Views\Home\Register.cshtml" />
<None Include="Views\Home\Requests.cshtml" />
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Remove="Views\Home\Requests.cshtml" />
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Remove="Views\Home\Register.cshtml" />
</ItemGroup>
</Project>

View File

@ -1,6 +1,7 @@
using BankClientApp.Models;
using BankContracts.ViewModels;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System.Diagnostics;
namespace BankClientApp.Controllers
@ -20,7 +21,7 @@ namespace BankClientApp.Controllers
}
public IActionResult Privacy()
{
return View();
return View(new ClientViewModel());
}
[HttpGet]
@ -44,36 +45,42 @@ namespace BankClientApp.Controllers
[HttpGet]
public IActionResult CardUpdate()
{
ViewBag.Cards = new List<CardViewModel>();
return View();
}
[HttpGet]
public IActionResult CardDelete()
{
ViewBag.Cards = new List<CardViewModel>();
return View();
}
[HttpGet]
public IActionResult Operation()
{
return View();
return View(new List<OperationViewModel>());
}
[HttpGet]
public IActionResult OperationCreate()
{
ViewBag.Cards = new List<CardViewModel>();
return View();
}
[HttpGet]
public IActionResult OperationUpdate()
{
ViewBag.Operations = new List<OperationViewModel>();
ViewBag.Cards = new List<CardViewModel>();
return View();
}
[HttpGet]
public IActionResult OperationDelete()
{
ViewBag.Operations = new List<OperationViewModel>();
return View();
}
@ -84,26 +91,30 @@ namespace BankClientApp.Controllers
}
[HttpGet]
public IActionResult Requests()
public IActionResult Request()
{
return View();
return View(new List<RequestViewModel>());
}
[HttpGet]
public IActionResult RequestCreate()
{
ViewBag.Cards = new List<CardViewModel>();
return View();
}
[HttpGet]
public IActionResult RequestUpdate()
{
ViewBag.Requests = new List<RequestViewModel>();
ViewBag.Cards = new List<CardViewModel>();
return View();
}
[HttpGet]
public IActionResult RequestDelete()
{
ViewBag.Requests = new List<RequestViewModel>();
return View();
}
@ -116,6 +127,7 @@ namespace BankClientApp.Controllers
[HttpGet]
public IActionResult TransferListReport()
{
ViewBag.Cards = new List<CardViewModel>();
return View();
}

View File

@ -1,6 +1,4 @@
//todo выводить список только для выбранного клиента
@{
@{
ViewData["Title"] = "CardDelete";
}
<div class="text-center">

View File

@ -1,5 +1,4 @@
@using BankContracts.ViewModels;
//todo выводить список только для выбранного клиента
@{
ViewData["Title"] = "CardUpdate";
}

View File

@ -1,4 +1,4 @@
@using BankContracts.ViewModels,
@using BankContracts.ViewModels
@model List<OperationViewModel>
@{
ViewData["Title"] = "Operation";
@ -8,13 +8,15 @@
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
// if (Model == null)
// {
// <h3 class="display-4">Авторизируйтесь</h3>
// return;
// }
<p>
<a asp-action="OperationCreate">Создать операцию</a>
<a asp-action="OperationUpdate">Обновить операцию</a>
<a asp-action="OperationDelete">Удалить операцию</a>
</p>
<table class="table">
<thead>

View File

@ -23,4 +23,8 @@
<select id="recipientcard" name="recipientcard" class="form-control" asp-items="@(new SelectList(@ViewBag.Cards, "Id", "Number"))"></select>
</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>

View File

@ -1,6 +1,4 @@
//todo выводить список только для выбранного клиента
@{
@{
ViewData["Title"] = "OperationDelete";
}
<div class="text-center">

View File

@ -1,5 +1,4 @@
//todo выводить список только для выбранного клиента

@{
ViewData["Title"] = "OperationDelete";
}
@ -10,11 +9,29 @@
<div class="row">
<div class="col-4">Карта:</div>
<div class="col-8">
<select id="card" name="card" class="form-control" asp-items="@(new SelectList(@ViewBag.Cards, "Id", "Number"))"></select>
<select id="card" name="card" class="form-control" asp-items="@(new SelectList(@ViewBag.Operations, "Id", "Number"))"></select>
</div>
</div>
<div class="row">
<div class="col-4"></div>
<div class="col-8"><input type="submit" value="Удалить" class="btn btn-danger" /></div>
<div class="col-4">Сумма:</div>
<div class="col-8">
<input type="text" name="sum" id="sum" />
</div>
</div>
<div class="row">
<div class="col-4">Отправитель:</div>
<div class="col-8">
<select id="sendercard" name="sendercard" class="form-control" asp-items="@(new SelectList(@ViewBag.Cards, "Id", "Number"))"></select>
</div>
</div>
<div class="row">
<div class="col-4">Получатель:</div>
<div class="col-8">
<select id="recipientcard" name="recipientcard" class="form-control" asp-items="@(new SelectList(@ViewBag.Cards, "Id", "Number"))"></select>
</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>

View File

@ -6,11 +6,11 @@
</div>
<div class="text-center">
@{
if (Model == null)
{
<h4 class="display-4">Авторизуйтесь!</h4>
return;
}
// if (Model == null)
// {
// <h4 class="display-4">Авторизуйтесь!</h4>
// return;
// }
<div class="row mb-5">
<div class="col-4">Начальная дата:</div>
<div class="col-8">

View File

@ -1,7 +1,7 @@
@using BankContracts.ViewModels
@model List<RequestViewModel>
@{
ViewData["Title"] = "Requests";
ViewData["Title"] = "Request";
}
<div class="text-center">
<h1 class="display-4">Запросы</h1>
@ -14,7 +14,9 @@
return;
}
<p>
<a asp-action="OperationCreate">Создать запрос</a>
<a asp-action="RequestCreate">Создать запрос</a>
<a asp-action="RequestUpdate">Обновить запрос</a>
<a asp-action="RequestDelete">Удалить запрос</a>
</p>
<table class="table">
<thead>

View File

@ -1,6 +1,4 @@
//todo выводить список только для выбранного клиента
@{
@{
ViewData["Title"] = "RequestDelete";
}
<div class="text-center">

View File

@ -1,14 +1,14 @@
@{
ViewData["Title"] = "CardCreate";
ViewData["Title"] = "RequestUpdate";
}
<div class="text-center">
<h2 class="display-4">Создание карты</h2>
<h2 class="display-4">Обновление заявки</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Услуга:</div>
<div class="col-4">Заявка:</div>
<div class="col-8">
<select id="request" name="request" class="form-control" asp-items="@(new SelectList(@ViewBag.Request, "Id", "Id"))"></select>
<select id="request" name="request" class="form-control" asp-items="@(new SelectList(@ViewBag.Requests, "Id", "Id"))"></select>
</div>
</div>
<div class="row">

View File

@ -20,8 +20,8 @@
</div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Word" class="btn btn-primary" /></div>
<div class="col-4"><input type="submit" value="Excel" class="btn btn-primary" /></div>
<div class="col-9"></div>
<div class="col-1"><input type="submit" value="Word" class="btn btn-primary" /></div>
<div class="col-1"><input type="submit" value="Excel" class="btn btn-primary" /></div>
</div>
</form>

View File

@ -21,16 +21,28 @@
<div class="navbar-collapse collapse d-sm-inline-flex flex-smrow-reverse">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Карты</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Enter">Вход</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Register">Регистрация</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Enter">Вход</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Карты</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Register">Регистрация</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Operation">Операции</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Request">Запросы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Report">Отчет</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="TransferListreport">Список</a>
</li>
</ul>
</div>