Compare commits
2 Commits
26ff7a9296
...
cdf8bb4b28
Author | SHA1 | Date | |
---|---|---|---|
cdf8bb4b28 | |||
852cb2e9a7 |
@ -6,13 +6,6 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="Views\Home\CardCreate.cshtml" />
|
||||
<Content Remove="Views\Home\Operation.cshtml" />
|
||||
<Content Remove="Views\Home\Register.cshtml" />
|
||||
<Content Remove="Views\Home\Requests.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
@ -23,32 +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>
|
||||
<Compile Include="Views\Home\Operation.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>
|
||||
|
@ -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
|
||||
@ -16,29 +17,120 @@ namespace BankClientApp.Controllers
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
if (APIClient.Client == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
return View();
|
||||
return View(new List<CardViewModel>());
|
||||
}
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
return View(new ClientViewModel());
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[HttpGet]
|
||||
public IActionResult Enter()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void Enter(string login, string password)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public IActionResult Privacy()
|
||||
[HttpGet]
|
||||
public IActionResult Register()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult CardCreate()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[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(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();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult OperationTransfer()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Request()
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Report()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult TransferListReport()
|
||||
{
|
||||
ViewBag.Cards = new List<CardViewModel>();
|
||||
return View();
|
||||
}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
//todo выводить список только для выбранного клиента
|
||||
|
||||
@{
|
||||
@{
|
||||
ViewData["Title"] = "CardDelete";
|
||||
}
|
||||
<div class="text-center">
|
||||
|
@ -1,5 +1,4 @@
|
||||
@using BankContracts.ViewModels;
|
||||
//todo выводить список только для выбранного клиента
|
||||
@{
|
||||
ViewData["Title"] = "CardUpdate";
|
||||
}
|
||||
|
@ -8,15 +8,14 @@
|
||||
</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="CardCreate">Создать карту</a>
|
||||
<a asp-action="CardUpdate">Обновить карту</a>
|
||||
//todo мб убрать
|
||||
<a asp-action="CardDelete">Удалить карту</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
18
Bank/BankClientApp/Views/Home/OperationDelete.cshtml
Normal file
18
Bank/BankClientApp/Views/Home/OperationDelete.cshtml
Normal file
@ -0,0 +1,18 @@
|
||||
@{
|
||||
ViewData["Title"] = "OperationDelete";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Удаление операции</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Операция:</div>
|
||||
<div class="col-8">
|
||||
<select id="operation" name="operation" class="form-control" asp-items="@(new SelectList(@ViewBag.Operations, "Id", "Id"))"></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>
|
||||
</form>
|
37
Bank/BankClientApp/Views/Home/OperationUpdate.cshtml
Normal file
37
Bank/BankClientApp/Views/Home/OperationUpdate.cshtml
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "OperationDelete";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Удаление операции</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<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.Operations, "Id", "Number"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<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>
|
59
Bank/BankClientApp/Views/Home/Report.cshtml
Normal file
59
Bank/BankClientApp/Views/Home/Report.cshtml
Normal file
@ -0,0 +1,59 @@
|
||||
@{
|
||||
ViewData["Title"] = "Report";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h3 class="display-4">Список карт с расшифровкой по операциям и заявкам</h3>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
@{
|
||||
// if (Model == null)
|
||||
// {
|
||||
// <h4 class="display-4">Авторизуйтесь!</h4>
|
||||
// return;
|
||||
// }
|
||||
<div class="row mb-5">
|
||||
<div class="col-4">Начальная дата:</div>
|
||||
<div class="col-8">
|
||||
<input type="date" id="startDate" name="startDate" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-5">
|
||||
<div class="col-4">Конечная дата:</div>
|
||||
<div class="col-8">
|
||||
<input type="date" id="endDate" name="endDate" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер
|
||||
</th>
|
||||
<th>
|
||||
Дата
|
||||
</th>
|
||||
<th>
|
||||
Карта
|
||||
</th>
|
||||
<th>
|
||||
Операция
|
||||
</th>
|
||||
<th>
|
||||
Заявка
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
будет заполняться вьюшками отчета
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Создать отчет" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Отправить на почту" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
@ -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>
|
@ -6,21 +6,20 @@
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Номер:</div>
|
||||
<div class="col-4">Сумма:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="number" id="number" />
|
||||
<input type="number" name="sum" id="sum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">CVV:</div>
|
||||
<div class="col-4">Карты:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="cvv" id="cvv" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">PIN:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="pin" id="pin" />
|
||||
<select name="cards" class="form-control" multiple size="5" id="cards">
|
||||
@foreach (var card in ViewBag.Cards)
|
||||
{
|
||||
<option value="@card.Id">@card.Number</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
18
Bank/BankClientApp/Views/Home/RequestDelete.cshtml
Normal file
18
Bank/BankClientApp/Views/Home/RequestDelete.cshtml
Normal file
@ -0,0 +1,18 @@
|
||||
@{
|
||||
ViewData["Title"] = "RequestDelete";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Удаление запрос</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Запрос:</div>
|
||||
<div class="col-8">
|
||||
<select id="request" name="request" class="form-control" asp-items="@(new SelectList(@ViewBag.Requests, "Id", "Id"))"></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>
|
||||
</form>
|
68
Bank/BankClientApp/Views/Home/RequestUpdate.cshtml
Normal file
68
Bank/BankClientApp/Views/Home/RequestUpdate.cshtml
Normal file
@ -0,0 +1,68 @@
|
||||
@{
|
||||
ViewData["Title"] = "RequestUpdate";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Обновление заявки</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Заявка:</div>
|
||||
<div class="col-8">
|
||||
<select id="request" name="request" class="form-control" asp-items="@(new SelectList(@ViewBag.Requests, "Id", "Id"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Сумма:</div>
|
||||
<div class="col-8">
|
||||
<input type="number" name="sum" id="sum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Карты:</div>
|
||||
<div class="col-8">
|
||||
<select name="cards" class="form-control" multiple size="5" id="cards">
|
||||
@foreach (var card in ViewBag.Cards)
|
||||
{
|
||||
<option value="@card.Id" data-name="@card.Number">@card.Number</option>
|
||||
}
|
||||
</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>
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script>
|
||||
function check() {
|
||||
var cards = $('#cards').val();
|
||||
$("#cards option:selected").removeAttr("selected");
|
||||
if (cards) {
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "/Home/GetCards",
|
||||
data: { serviceId: service },
|
||||
success: function (result) {
|
||||
console.log(result.item2);
|
||||
$('#name').val(result.item1.serviceName);
|
||||
$('#price').val(result.item1.price);
|
||||
$.map(result.item2, function (n) {
|
||||
console.log("#" + n);
|
||||
$(`option[data-name=${n}]`).attr("selected", "selected")
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
}
|
||||
check();
|
||||
$('#request').on('change', function () {
|
||||
check();
|
||||
});
|
||||
</script>
|
||||
}
|
27
Bank/BankClientApp/Views/Home/TransferListReport.cshtml
Normal file
27
Bank/BankClientApp/Views/Home/TransferListReport.cshtml
Normal file
@ -0,0 +1,27 @@
|
||||
@using BankContracts.ViewModels;
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "TransferListReport";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создать списки переводов по картам</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Карты:</div>
|
||||
<div class="col-8">
|
||||
<select name="cards" class="form-control" multiple size="5" id="cards">
|
||||
@foreach (var card in ViewBag.Cards)
|
||||
{
|
||||
<option value="@card.Id">@card.Number</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<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>
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user