Compare commits
No commits in common. "cdf8bb4b28f30143836c885eca554a49785ce9ba" and "26ff7a9296b7946f449aba7f969a6845bf370b0c" have entirely different histories.
cdf8bb4b28
...
26ff7a9296
@ -6,6 +6,13 @@
|
||||
<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>
|
||||
@ -16,4 +23,32 @@
|
||||
<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,7 +1,6 @@
|
||||
using BankClientApp.Models;
|
||||
using BankContracts.ViewModels;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace BankClientApp.Controllers
|
||||
@ -17,120 +16,29 @@ namespace BankClientApp.Controllers
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View(new List<CardViewModel>());
|
||||
}
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
return View(new ClientViewModel());
|
||||
if (APIClient.Client == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[HttpGet]
|
||||
public IActionResult Enter()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void Enter(string login, string password)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Register()
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
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,4 +1,6 @@
|
||||
@{
|
||||
//todo выводить список только для выбранного клиента
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "CardDelete";
|
||||
}
|
||||
<div class="text-center">
|
||||
|
@ -1,4 +1,5 @@
|
||||
@using BankContracts.ViewModels;
|
||||
//todo выводить список только для выбранного клиента
|
||||
@{
|
||||
ViewData["Title"] = "CardUpdate";
|
||||
}
|
||||
|
@ -8,14 +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="CardCreate">Создать карту</a>
|
||||
<a asp-action="CardUpdate">Обновить карту</a>
|
||||
//todo мб убрать
|
||||
<a asp-action="CardDelete">Удалить карту</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
|
@ -8,15 +8,13 @@
|
||||
</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,8 +23,4 @@
|
||||
<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>
|
||||
|
@ -1,18 +0,0 @@
|
||||
@{
|
||||
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>
|
@ -1,37 +0,0 @@
|
||||
|
||||
@{
|
||||
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>
|
@ -1,59 +0,0 @@
|
||||
@{
|
||||
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>
|
@ -6,20 +6,21 @@
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Сумма:</div>
|
||||
<div class="col-4">Номер:</div>
|
||||
<div class="col-8">
|
||||
<input type="number" name="sum" id="sum" />
|
||||
<input type="text" name="number" id="number" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Карты:</div>
|
||||
<div class="col-4">CVV:</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>
|
||||
<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" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -1,18 +0,0 @@
|
||||
@{
|
||||
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>
|
@ -1,68 +0,0 @@
|
||||
@{
|
||||
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>
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
@using BankContracts.ViewModels
|
||||
@model List<RequestViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Request";
|
||||
ViewData["Title"] = "Requests";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Запросы</h1>
|
||||
@ -14,9 +14,7 @@
|
||||
return;
|
||||
}
|
||||
<p>
|
||||
<a asp-action="RequestCreate">Создать запрос</a>
|
||||
<a asp-action="RequestUpdate">Обновить запрос</a>
|
||||
<a asp-action="RequestDelete">Удалить запрос</a>
|
||||
<a asp-action="OperationCreate">Создать запрос</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
@ -1,27 +0,0 @@
|
||||
@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,28 +21,16 @@
|
||||
<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="Enter">Вход</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="Index">Карты</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="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="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>
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Register">Регистрация</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user