This commit is contained in:
abazov73 2023-05-20 12:09:17 +04:00
commit 783d623015
12 changed files with 24 additions and 18 deletions

View File

@ -54,7 +54,9 @@ namespace BankOperatorApp.Controllers
{ {
if (HomeController.BankOperator == null) if (HomeController.BankOperator == null)
{ {
return Redirect("~/Home/Enter"); Response.WriteAsync($"<script language=\"javascript\">" +
$"alert('You need to login!');window.location.replace('/Home/Enter');</script>");
return Redirect("/Home/Enter");
} }
return View(HomeController.BankOperator); return View(HomeController.BankOperator);
} }
@ -172,6 +174,8 @@ namespace BankOperatorApp.Controllers
{ {
if (HomeController.BankOperator == null) if (HomeController.BankOperator == null)
{ {
Response.WriteAsync($"<script language=\"javascript\">" +
$"alert('You need to login!');window.location.replace('/Home/Enter');</script>");
return Redirect("~/Home/Enter"); return Redirect("~/Home/Enter");
} }
return View(_creditProgramLogic.ReadList(new CreditProgramSearchModel return View(_creditProgramLogic.ReadList(new CreditProgramSearchModel
@ -255,6 +259,8 @@ namespace BankOperatorApp.Controllers
{ {
if (HomeController.BankOperator == null) if (HomeController.BankOperator == null)
{ {
Response.WriteAsync($"<script language=\"javascript\">" +
$"alert('You need to login!');window.location.replace('/Home/Enter');</script>");
return Redirect("~/Home/Enter"); return Redirect("~/Home/Enter");
} }
return View(_currencyPurchaseLogic.ReadList(new CurrencyPurchaseSearchModel return View(_currencyPurchaseLogic.ReadList(new CurrencyPurchaseSearchModel

View File

@ -8,13 +8,13 @@
<div class="row"> <div class="row">
<div class="col-4">Выплата:</div> <div class="col-4">Выплата:</div>
<div class="col-8"> <div class="col-8">
<select id="creditProgram" name="creditProgram" class="form-control" required asp-items="@(new SelectList(@ViewBag.CreditPrograms,"Id", "Name"))"></select> <select required id="creditProgram" name="creditProgram" class="form-control" required asp-items="@(new SelectList(@ViewBag.CreditPrograms,"Id", "Name"))"></select>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-4">Сделки:</div> <div class="col-4">Сделки:</div>
<div class="col-8"> <div class="col-8">
<select id="deals" name="deals" class="form-control" required multiple asp-items="@(new SelectList(@ViewBag.Deals,"Id", "DealDate"))"></select> <select required id="deals" name="deals" class="form-control" required multiple asp-items="@(new SelectList(@ViewBag.Deals,"Id", "DealDate"))"></select>
</div> </div>
</div> </div>
<div class="row"> <div class="row">

View File

@ -7,16 +7,16 @@
<form method="post"> <form method="post">
<div class="row"> <div class="row">
<div class="col-4">Название:</div> <div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="name" id="name" /></div> <div class="col-8"><input type="text" name="name" id="name" required/></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-4">Процент:</div> <div class="col-4">Процент:</div>
<div class="col-8"><input type="text" name="percent" id="percent" /></div> <div class="col-8"><input type="text" name="percent" id="percent" required/></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-4">Валюты:</div> <div class="col-4">Валюты:</div>
<div class="col-8"> <div class="col-8">
<select id="currencies" name="currencies" class="form-control" <select id="currencies" name="currencies" class="form-control" required
multiple asp-items="@(new SelectList(@ViewBag.Currencies,"Id", "Name"))"></select> multiple asp-items="@(new SelectList(@ViewBag.Currencies,"Id", "Name"))"></select>
</div> </div>
</div> </div>

View File

@ -7,7 +7,7 @@
<form method="post"> <form method="post">
<div class="row"> <div class="row">
<div class="col-4">Название:</div> <div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="name" id="name" /></div> <div class="col-8"><input type="text" name="name" id="name" required/></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-8"></div> <div class="col-8"></div>

View File

@ -8,13 +8,13 @@
<div class="row"> <div class="row">
<div class="col-4">Валюты::</div> <div class="col-4">Валюты::</div>
<div class="col-8"> <div class="col-8">
<select id="currencyId" name="currencyId" class="form-control" <select id="currencyId" name="currencyId" class="form-control" required
asp-items="@(new SelectList(@ViewBag.Currencies,"Id", "Name"))"></select> asp-items="@(new SelectList(@ViewBag.Currencies,"Id", "Name"))"></select>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-4">Сумма:</div> <div class="col-4">Сумма:</div>
<div class="col-8"><input type="text" name="amount" id="amount" /></div> <div class="col-8"><input type="text" name="amount" id="amount" required/></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-8"></div> <div class="col-8"></div>

View File

@ -20,7 +20,7 @@
} }
<p> <p>
<a asp-action="CreateCreditProgram">Создать кредитную программу</a> <a asp-action="CreateCreditProgram"><button class="btn btn-primary">Создать кредитную программу</button></a>
</p> </p>
<table class="table"> <table class="table">
<thead> <thead>
@ -56,7 +56,7 @@
@Html.DisplayFor(modelItem => item.BankOperatorFIO) @Html.DisplayFor(modelItem => item.BankOperatorFIO)
</td> </td>
<td> <td>
<a asp-action="CreditProgram" asp-route-id="@item.Id">Подробнее</a> <a asp-action="CreditProgram" asp-route-id="@item.Id"><button class="btn btn-primary">Подробнее</button></a>
</td> </td>
</tr> </tr>
} }

View File

@ -35,7 +35,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-4">email:</div> <div class="col-4">email:</div>
<div class="col-8"><input type="text" name="email" id="email" /></div> <div class="col-8"><input type="email" name="email" id="email" /></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-4">Имя файла (необязательно):</div> <div class="col-4">Имя файла (необязательно):</div>

View File

@ -19,7 +19,7 @@
return; return;
} }
<p> <p>
<a asp-action="CreateCurrencyPurchase"><button>Купить валюту</button></a> <a asp-action="CreateCurrencyPurchase"><button class="btn btn-primary">Купить валюту</button></a>
</p> </p>
<table class="table"> <table class="table">
<thead> <thead>

View File

@ -2,13 +2,13 @@
ViewData["Title"] = "CurrencyReport"; ViewData["Title"] = "CurrencyReport";
} }
<div class="text-center"> <div class="text-center">
<h2 class="display-4">Создание валюты</h2> <h2 class="display-4">Отчет по валюте</h2>
</div> </div>
<form method="post"> <form method="post">
<div class="row"> <div class="row">
<div class="col-4">Валюты:</div> <div class="col-4">Валюты:</div>
<div class="col-8"> <div class="col-8">
<select id="currencies" name="currencies" class="form-control" <select id="currencies" name="currencies" class="form-control" required
multiple asp-items="@(new SelectList(@ViewBag.Currencies,"Id", "Name"))"></select> multiple asp-items="@(new SelectList(@ViewBag.Currencies,"Id", "Name"))"></select>
</div> </div>
</div> </div>

View File

@ -20,7 +20,7 @@
} }
<p> <p>
<a asp-action="CreateCurrency"><button>Создать валюту</button> </a> <a asp-action="CreateCurrency"><button class="btn btn-primary">Создать валюту</button> </a>
</p> </p>
<table class="table"> <table class="table">
<thead> <thead>

View File

@ -12,7 +12,7 @@
<header> <header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"> <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Оператор</a> <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Оператор банка</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent" <button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation"> aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>