diff --git a/Bank/BankOperatorApp/Controllers/HomeController.cs b/Bank/BankOperatorApp/Controllers/HomeController.cs index f1bbd49..747bbe5 100644 --- a/Bank/BankOperatorApp/Controllers/HomeController.cs +++ b/Bank/BankOperatorApp/Controllers/HomeController.cs @@ -218,7 +218,7 @@ namespace BankOperatorApp.Controllers return View(); } [HttpPost] - public void CreateCurrencyPurchasr(string amount, int currencyId) + public void CreateCurrencyPurchase(string amount, int currencyId) { if (APIClient.BankOperator == null) { @@ -226,10 +226,12 @@ namespace BankOperatorApp.Controllers } _currencyPurchaseLogic.Create(new CurrencyPurchaseBindingModel - { BankOperatorId = APIClient.BankOperator.Id, + { BankOperatorId = APIClient.BankOperator.Id, Amount = (float)Convert.ToDouble(amount), - CurrencyId = currencyId }); - Response.Redirect("Transfers"); + CurrencyId = currencyId, + + }); + Response.Redirect("CurrencyPurchases"); } } } \ No newline at end of file diff --git a/Bank/BankOperatorApp/Views/Home/CreditProgram.cshtml b/Bank/BankOperatorApp/Views/Home/CreditProgram.cshtml new file mode 100644 index 0000000..02be98c --- /dev/null +++ b/Bank/BankOperatorApp/Views/Home/CreditProgram.cshtml @@ -0,0 +1,32 @@ +@using BankContracts.ViewModels + +@model CreditProgramViewModel + +@{ + ViewData["Title"] = "CreditProgram"; +} + +
+

Кредитная программа№@Model.Id

+
+ + +
+ @{ + if (Model == null) + { +

Авторизируйтесь

+ return; + } + } + +

ФИО оператора: @Model.BankOperatorFIO

+

Название кредитной программы: @Model.Name

+

Процент кредитования: @Model.Percent

+

Валюты:

+ @foreach (var currency in Model.CreditProgramCurrencies) + { +
Валюта №@currency.Value.Id, + @currency.Value.Name
+ } +
\ No newline at end of file diff --git a/Bank/BankOperatorApp/Views/Home/CreditPrograms.cshtml b/Bank/BankOperatorApp/Views/Home/CreditPrograms.cshtml new file mode 100644 index 0000000..e1dd794 --- /dev/null +++ b/Bank/BankOperatorApp/Views/Home/CreditPrograms.cshtml @@ -0,0 +1,5 @@ +@* + For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 +*@ +@{ +} diff --git a/Bank/BankOperatorApp/Views/Home/CurrencyPurchases.cshtml b/Bank/BankOperatorApp/Views/Home/CurrencyPurchases.cshtml new file mode 100644 index 0000000..08c0cdd --- /dev/null +++ b/Bank/BankOperatorApp/Views/Home/CurrencyPurchases.cshtml @@ -0,0 +1,68 @@ +@using BankContracts.ViewModels + +@model List + +@{ + ViewData["Title"] = "CurrencyPurchases"; +} + +
+

Покупки валют

+
+ + +
+ @{ + if (Model == null) + { +

Авторизируйтесь

+ return; + } +

+ Купить валюту +

+ + + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + + } + +
+ Номер покупки + + Дата покупки + + Название валюты + + Количество валюты + + ФИО оператора +
+ @Html.DisplayFor(modelItem => item.Id) + + @Html.DisplayFor(modelItem => item.PurchaseDate ) + + @Html.DisplayFor(modelItem => item.CurrencyName) + + @Html.DisplayFor(modelItem => item.Amount) + + @Html.DisplayFor(modelItem => item.BankOperatorName) +
+ } +
diff --git a/Bank/BankOperatorApp/Views/Home/Enter.cshtml b/Bank/BankOperatorApp/Views/Home/Enter.cshtml new file mode 100644 index 0000000..106d3d5 --- /dev/null +++ b/Bank/BankOperatorApp/Views/Home/Enter.cshtml @@ -0,0 +1,21 @@ +@{ + ViewData["Title"] = "Enter"; +} + +
+

Вход в приложение

+
+
+
+
Логин:
+
+
+
+
Пароль:
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/Bank/BankOperatorApp/Views/Home/Index.cshtml b/Bank/BankOperatorApp/Views/Home/Index.cshtml index d2d19bd..8474dba 100644 --- a/Bank/BankOperatorApp/Views/Home/Index.cshtml +++ b/Bank/BankOperatorApp/Views/Home/Index.cshtml @@ -1,8 +1,57 @@ -@{ +@using BankContracts.ViewModels + +@model List + +@{ ViewData["Title"] = "Home Page"; }
-

Welcome

-

Learn about building Web apps with ASP.NET Core.

+

Валюты

+ + +
+ @{ + if (Model == null) + { +

Авторизируйтесь!

+ return; + } + +

+ Создать валюту +

+ + + + + + + + + + @foreach (var item in Model) + { + + + + + + } + +
+ Номер + + Название валюты + + ФИО оператора +
+ @Html.DisplayFor(modelItem => item.Id) + + @Html.DisplayFor(modelItem => item.Name) + + @Html.DisplayFor(modelItem => item.BankOperatorName) +
+ } +
\ No newline at end of file diff --git a/Bank/BankOperatorApp/Views/Home/Privacy.cshtml b/Bank/BankOperatorApp/Views/Home/Privacy.cshtml index af4fb19..336c853 100644 --- a/Bank/BankOperatorApp/Views/Home/Privacy.cshtml +++ b/Bank/BankOperatorApp/Views/Home/Privacy.cshtml @@ -1,6 +1,36 @@ -@{ - ViewData["Title"] = "Privacy Policy"; -} -

@ViewData["Title"]

+@using BankContracts.ViewModels -

Use this page to detail your site's privacy policy.

+@model BankOperatorViewModel + +@{ + ViewData["Title"] = "Privacy Policy"; +} +
+

Личные данные

+
+
+
+
Логин:
+
+
+
+
Пароль:
+
+
+
+
Фамилия:
+
+
+
+
Имя:
+
+
+
+
Отчество:
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/Bank/BankOperatorApp/Views/Home/Register.cshtml b/Bank/BankOperatorApp/Views/Home/Register.cshtml new file mode 100644 index 0000000..1468e64 --- /dev/null +++ b/Bank/BankOperatorApp/Views/Home/Register.cshtml @@ -0,0 +1,33 @@ +@{ + ViewData["Title"] = "Register"; +} + +
+

Регистрация

+
+
+
+
Логин:
+
+
+
+
Пароль:
+
+
+
+
Фамилия:
+
+
+
+
Имя:
+
+
+
+
Отчество (необязательно):
+
+
+
+
+
+
+
\ No newline at end of file