мы думали, что все, а оказалось нет, но мы молодцы, исправили, теперь точно все
This commit is contained in:
parent
eb1c9328bf
commit
79fe2b3214
@ -13,7 +13,7 @@ namespace BankDatabaseImplement
|
|||||||
optionsBuilder.UseNpgsql(@"
|
optionsBuilder.UseNpgsql(@"
|
||||||
Host=localhost;
|
Host=localhost;
|
||||||
Port=5432;
|
Port=5432;
|
||||||
Database=BankFullNew;
|
Database=BankFullNew1;
|
||||||
Username=postgres;
|
Username=postgres;
|
||||||
Password=postgres;");
|
Password=postgres;");
|
||||||
}
|
}
|
||||||
|
62
Bank/BankEmployeeApp/Controllers/AuthorizationController.cs
Normal file
62
Bank/BankEmployeeApp/Controllers/AuthorizationController.cs
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
using BankContracts.BindingModels;
|
||||||
|
using BankContracts.BusinessLogicContracts;
|
||||||
|
using BankContracts.SearchModels;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace BankEmployeeApp.Controllers
|
||||||
|
{
|
||||||
|
public class AuthorizationController : Controller
|
||||||
|
{
|
||||||
|
private readonly ILogger<HomeController> _logger;
|
||||||
|
private readonly IEmployeeLogic _employeeLogic;
|
||||||
|
|
||||||
|
public AuthorizationController(ILogger<HomeController> logger, IEmployeeLogic employeeLogic)
|
||||||
|
{
|
||||||
|
_employeeLogic = employeeLogic;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public IActionResult Register()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public void Register(EmployeeBindingModel model)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(model.PhoneNumber) ||
|
||||||
|
string.IsNullOrEmpty(model.FirstName) ||
|
||||||
|
string.IsNullOrEmpty(model.MiddleName) ||
|
||||||
|
string.IsNullOrEmpty(model.LastName) ||
|
||||||
|
string.IsNullOrEmpty(model.Post) ||
|
||||||
|
string.IsNullOrEmpty(model.Password))
|
||||||
|
{
|
||||||
|
throw new Exception("Все поля должны быть заполнены");
|
||||||
|
}
|
||||||
|
_employeeLogic.Create(model);
|
||||||
|
_logger.LogInformation("Зарегистрирован работник");
|
||||||
|
Response.Redirect("Enter");
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult Enter()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public void Enter(EmployeeSearchModel model)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(model.PhoneNumber) || string.IsNullOrEmpty(model.Password))
|
||||||
|
{
|
||||||
|
throw new Exception("Все поля должны быть заполнены");
|
||||||
|
}
|
||||||
|
var result = _employeeLogic.ReadElement(model);
|
||||||
|
HttpContext.Session.SetString(SessionKeys.EmployeePhone, model.PhoneNumber);
|
||||||
|
HttpContext.Session.SetString(SessionKeys.EmployeePassword, model.Password);
|
||||||
|
_logger.LogInformation("Был осуществел вход за сотрудника {@employee} и добавлены его данные в сессию", result);
|
||||||
|
Response.Redirect("../../Home/Index");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,26 +1,73 @@
|
|||||||
using BankEmployeeApp.Models;
|
using BankEmployeeApp.Models;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using BankContracts.BindingModels;
|
||||||
|
using BankContracts.BusinessLogicContracts;
|
||||||
|
using BankContracts.ViewModels;
|
||||||
|
using BankEmployeeApp.Filters;
|
||||||
|
using System.Collections;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace BankEmployeeApp.Controllers
|
namespace BankEmployeeApp.Controllers
|
||||||
{
|
{
|
||||||
|
[AuthorizationFilter]
|
||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
private readonly ILogger<HomeController> _logger;
|
private readonly ILogger<HomeController> _logger;
|
||||||
|
private readonly IEmployeeLogic _employeeLogic;
|
||||||
|
private readonly IOperationLogic _carLogic;
|
||||||
|
private readonly ICostLogic _costLogic;
|
||||||
|
private readonly IPurchaseLogic _purchaseLogic;
|
||||||
|
private readonly IPaymentLogic _paymentLogic;
|
||||||
|
private readonly IReportLogic _reportLogic;
|
||||||
|
|
||||||
public HomeController(ILogger<HomeController> logger)
|
private EmployeeViewModel? _employee;
|
||||||
|
|
||||||
|
public HomeController(ILogger<HomeController> logger,
|
||||||
|
IEmployeeLogic employeeLogic, IOperationLogic carLogic, ICostLogic costLogic,
|
||||||
|
IPurchaseLogic purchaseLogic, IPaymentLogic paymentLogic, IReportLogic reportLogic)
|
||||||
{
|
{
|
||||||
|
_reportLogic = reportLogic;
|
||||||
|
_paymentLogic = paymentLogic;
|
||||||
|
_purchaseLogic = purchaseLogic;
|
||||||
|
_costLogic = costLogic;
|
||||||
|
_carLogic = carLogic;
|
||||||
|
_employeeLogic = employeeLogic;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private EmployeeViewModel Employee {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_employee == null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_employee = _employeeLogic.ReadElement(new()
|
||||||
|
{
|
||||||
|
PhoneNumber = HttpContext.Session.GetString(SessionKeys.EmployeePhone),
|
||||||
|
Password = HttpContext.Session.GetString(SessionKeys.EmployeePassword),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
_logger.LogError(e, "Не удалось получить пользователя, хотя был пройден фильтр авторизации");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _employee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public IActionResult Index()
|
public IActionResult Index()
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation("Переход на главную страницу");
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult Privacy()
|
public IActionResult Privacy()
|
||||||
{
|
{
|
||||||
return View();
|
return View(Employee);
|
||||||
}
|
}
|
||||||
|
|
||||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||||
@ -28,5 +75,190 @@ namespace BankEmployeeApp.Controllers
|
|||||||
{
|
{
|
||||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IActionResult Operations()
|
||||||
|
{
|
||||||
|
return View(_carLogic.ReadList(new() { EmployeeId = Employee.Id }));
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult Purchases()
|
||||||
|
{
|
||||||
|
return View(_carLogic.ReadList(new() { EmployeeId = Employee.Id }));
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult Costs()
|
||||||
|
{
|
||||||
|
return View(_costLogic.ReadList(new() { EmployeeId = Employee.Id }));
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult ReportFromOperations(string? getReport, string? sendToMail, DateTime startDate, DateTime endDate)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("Попытка получить отчет: {@getReport}; {@sendToMail} Период: {0}---{1}", getReport, sendToMail, startDate, endDate);
|
||||||
|
if (startDate > endDate)
|
||||||
|
{
|
||||||
|
throw new Exception("Дата начала больше даты конца периода");
|
||||||
|
}
|
||||||
|
if (getReport != null)
|
||||||
|
{
|
||||||
|
return View(_paymentLogic.ReadList(new()
|
||||||
|
{
|
||||||
|
DateFrom = DateOnly.FromDateTime(startDate),
|
||||||
|
DateTo = DateOnly.FromDateTime(endDate)
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
if (sendToMail != null)
|
||||||
|
{
|
||||||
|
_reportLogic.SendPaymentsToEmail(
|
||||||
|
option: new()
|
||||||
|
{
|
||||||
|
DateFrom = DateOnly.FromDateTime(startDate),
|
||||||
|
DateTo = DateOnly.FromDateTime(endDate)
|
||||||
|
},
|
||||||
|
email: Employee.Email
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public IActionResult Operation(int? id)
|
||||||
|
{
|
||||||
|
if (id.HasValue)
|
||||||
|
{
|
||||||
|
return View(_carLogic.ReadElement(new() {Id = id}));
|
||||||
|
}
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public void Operation(OperationBindingModel car)
|
||||||
|
{
|
||||||
|
var isOperationUpdate = Request.RouteValues.TryGetValue("id", out var identValue);
|
||||||
|
isOperationUpdate &= int.TryParse((string?)identValue, out var id);
|
||||||
|
|
||||||
|
_logger.LogInformation("При изменении обследования были получены данные: {_mark}; {_model}; {idUpdated}", car.Mark, car.Model, identValue);
|
||||||
|
|
||||||
|
if (isOperationUpdate)
|
||||||
|
{
|
||||||
|
car.Id = id;
|
||||||
|
_carLogic.Update(car);
|
||||||
|
Response.Redirect("../Operations");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
car.EmployeeId = Employee.Id;
|
||||||
|
_carLogic.Create(car);
|
||||||
|
Response.Redirect("Operations");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult RemoveOperation(int id)
|
||||||
|
{
|
||||||
|
_carLogic.Delete(new() { Id = id });
|
||||||
|
return Redirect("~/Home/Operations");
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public FileResult ReportPurchasesInWord(int[] ids)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("Запрошен отчет в формате word");
|
||||||
|
_logger.LogInformation("Получено {count} обследований для отчета", ids.Length);
|
||||||
|
|
||||||
|
MemoryStream mstream = new();
|
||||||
|
_reportLogic.SavePurchasesToWord(new()
|
||||||
|
{
|
||||||
|
Ids = ids,
|
||||||
|
Stream = mstream,
|
||||||
|
});
|
||||||
|
return File(mstream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Octet, "reportWord.docx");
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public FileResult ReportPurchasesInExcel(int[] ids)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("Запрошен отчет в формате excel");
|
||||||
|
_logger.LogInformation("Получено {count} обследований для отчета", ids.Length);
|
||||||
|
|
||||||
|
MemoryStream mstream = new();
|
||||||
|
_reportLogic.SavePurchasesToExcel(new()
|
||||||
|
{
|
||||||
|
Ids = ids,
|
||||||
|
Stream = mstream
|
||||||
|
});
|
||||||
|
return File(mstream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Octet, "reportExcel.xlsx");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public IActionResult Cost(int? id)
|
||||||
|
{
|
||||||
|
if (id.HasValue)
|
||||||
|
{
|
||||||
|
return View(_costLogic.ReadElement(new() { Id = id }));
|
||||||
|
}
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public void Cost(string name, double price)
|
||||||
|
{
|
||||||
|
var isOperationUpdate = Request.RouteValues.TryGetValue("id", out var identValue);
|
||||||
|
isOperationUpdate &= int.TryParse((string?)identValue, out var id);
|
||||||
|
|
||||||
|
_logger.LogInformation("При изменении затрат были получены данные: {name}; {price}; {idUpdated}", name, price, identValue);
|
||||||
|
CostBindingModel model = new()
|
||||||
|
{
|
||||||
|
NameOfCost = name,
|
||||||
|
Price = price,
|
||||||
|
};
|
||||||
|
if (isOperationUpdate)
|
||||||
|
{
|
||||||
|
model.Id = id;
|
||||||
|
_costLogic.Update(model);
|
||||||
|
Response.Redirect("../Costs");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
model.EmployeeId = Employee.Id;
|
||||||
|
_costLogic.Create(model);
|
||||||
|
Response.Redirect("Costs");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult RemoveCost(int id)
|
||||||
|
{
|
||||||
|
_costLogic.Delete(new() { Id = id });
|
||||||
|
return Redirect("~/Home/Costs");
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult BindPurchase(int id)
|
||||||
|
{
|
||||||
|
ViewBag.Costs = _costLogic.ReadList(new() { EmployeeId = Employee.Id });
|
||||||
|
ViewBag.SelectedId = id;
|
||||||
|
ViewBag.Purchases = _purchaseLogic.ReadList();
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public void BindPurchase(int cost, int purchase, int count)
|
||||||
|
{
|
||||||
|
var purchaseModel = _purchaseLogic.ReadElement(new() { Id = purchase });
|
||||||
|
var costmodel = _costLogic.ReadElement(new() { Id = cost });
|
||||||
|
_costLogic.Update(new()
|
||||||
|
{
|
||||||
|
Id = cost,
|
||||||
|
Price = costmodel.Price,
|
||||||
|
NameOfCost = costmodel.NameOfCost,
|
||||||
|
PurchasesModels =
|
||||||
|
{
|
||||||
|
[purchase] = new() { Count = count, PurchaseId = purchase }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Response.Redirect("/Home/Costs");
|
||||||
|
}
|
||||||
|
|
||||||
|
public double CalcCostSum(int cost, int count)
|
||||||
|
{
|
||||||
|
return _costLogic.ReadElement(new() {Id = cost}).Price * count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
62
Bank/BankEmployeeApp/Views/Home/BindPurchase.cshtml
Normal file
62
Bank/BankEmployeeApp/Views/Home/BindPurchase.cshtml
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
@{
|
||||||
|
ViewData["Title"] = "Привязка статьи затрат к сделке";
|
||||||
|
|
||||||
|
var costs = new SelectList(ViewBag.Costs, "Id", "NameOfCost");
|
||||||
|
costs.Where(x => Convert.ToInt32(x.Value) == ViewBag.SelectedId).ToList().ForEach(x => x.Selected = true);
|
||||||
|
}
|
||||||
|
<div>
|
||||||
|
<h2 class="display-4">@ViewData["Title"]</h2>
|
||||||
|
</div>
|
||||||
|
<form method="post">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Статья затрат:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select id="cost" name="cost" class="form-control" asp-items="@costs"></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Сделки:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select id="purchase" name="purchase" class="form-control" asp-items="@(new SelectList(@ViewBag.Purchases, "Id", "Id"))"></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Количество:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name ="count" id="count" placeholder="Количество">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Итоговая сумма:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" id="resultSum" placeholder="Итоговая сумма" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-center mb-2">
|
||||||
|
<input type="submit" value="Привязать" class="btn btn-primary" id="submit" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
@section Scripts
|
||||||
|
{
|
||||||
|
<script>
|
||||||
|
$('#cost').on('change', check);
|
||||||
|
$('#count').on('change', check);
|
||||||
|
|
||||||
|
function check() {
|
||||||
|
var count = $('#count').val();
|
||||||
|
var cost = $('#cost').val();
|
||||||
|
if (count && cost) {
|
||||||
|
$.ajax({
|
||||||
|
method: "POST",
|
||||||
|
url: "/Home/CalcCostSum",
|
||||||
|
data: { count: count, cost: cost },
|
||||||
|
success: function (result) {
|
||||||
|
$("#resultSum").val(result);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</script>
|
||||||
|
}
|
39
Bank/BankEmployeeApp/Views/Home/Cost.cshtml
Normal file
39
Bank/BankEmployeeApp/Views/Home/Cost.cshtml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
|
@model BankContracts.ViewModels.CostViewModel?
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = Model == null ? "Создание статьи затрат" : "Изменение статьи затрат";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2 class="display-4">@ViewData["Title"]</h2>
|
||||||
|
</div>
|
||||||
|
<form method="post">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Название:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="name" id="input_name" placeholder="Название">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Стоимость:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="number" step="any" class="form-control" name="price" id="price" placeholder="Стоимость">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-center mb-2">
|
||||||
|
<input type="submit" value="Создать" class="btn btn-primary" id="submit" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
@section Scripts
|
||||||
|
{
|
||||||
|
@if (Model != null)
|
||||||
|
{
|
||||||
|
<script>
|
||||||
|
$("#submit").val("Изменить");
|
||||||
|
$("#input_name").attr('readonly', true);
|
||||||
|
$("#input_name").val("@Html.Raw(Model.NameOfCost)");
|
||||||
|
$("#price").val("@Html.Raw(Model.Price)");
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
}
|
35
Bank/BankEmployeeApp/Views/Home/Costs.cshtml
Normal file
35
Bank/BankEmployeeApp/Views/Home/Costs.cshtml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
|
|
||||||
|
@model List<BankContracts.ViewModels.CostViewModel>
|
||||||
|
@{
|
||||||
|
<h1>@ViewData["Title"]</h1>
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<a asp-action="Cost">Создать новую статью затрат</a>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Номер телефона сотрудника</th>
|
||||||
|
<th>Название</th>
|
||||||
|
<th>Стоимость</th>
|
||||||
|
<th>Изменить</th>
|
||||||
|
<th>Удалить</th>
|
||||||
|
<th>Привязка</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach (var cost in Model)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>@Html.DisplayFor(x => cost.PhoneNumber)</td>
|
||||||
|
<td>@Html.DisplayFor(x => cost.NameOfCost)</td>
|
||||||
|
<td>@Html.DisplayFor(x => cost.Price)</td>
|
||||||
|
<td><a asp-action="Cost" asp-route-id="@cost.Id">Изменить</a></td>
|
||||||
|
<td><a asp-action="RemoveCost" asp-route-id="@cost.Id">Удалить</a></td>
|
||||||
|
<td><a asp-action="BindPurchase" asp-route-id="@cost.Id">Привязать покупку</a></td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
100
Bank/BankEmployeeApp/Views/Home/Enter.cshtml
Normal file
100
Bank/BankEmployeeApp/Views/Home/Enter.cshtml
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
@{
|
||||||
|
ViewData["Title"] = "Сотрудник-вход";
|
||||||
|
}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 500px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group label {
|
||||||
|
display: block;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
width: 100%;
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 16px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #337ab7;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover {
|
||||||
|
background-color: #23527c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-link {
|
||||||
|
display: block;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #777;
|
||||||
|
text-decoration: none;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-link:hover {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h2 class="title">@ViewData["Title"]</h2>
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="PhoneNumber">Номер телефона:</label>
|
||||||
|
<input type="text" class="form-control" id="PhoneNumber" name="PhoneNumber" placeholder="Номер телефона">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="Password">Пароль:</label>
|
||||||
|
<input type="password" class="form-control" id="Password" name="Password" placeholder="Пароль">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<input type="submit" value="Войти" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<a class="register-link" asp-controller="Authorization" asp-action="Register">Зарегистрироваться.</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
@ -2,7 +2,27 @@
|
|||||||
ViewData["Title"] = "Home Page";
|
ViewData["Title"] = "Home Page";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: #fff; /* Изменяем фон на белый */
|
||||||
|
color: #333; /* Цвет текста */
|
||||||
|
font-family: 'Roboto', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-center {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.display-4 {
|
||||||
|
font-size: 36px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h1 class="display-4">Welcome</h1>
|
<h1 class="display-4">Добро пожаловать в «Банк «Вы банкрот». Сотрудник»</h1>
|
||||||
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
|
<img src="https://argumenti.ru/images/arhnews/587918.jpg" alt="Logo" />
|
||||||
</div>
|
</div>
|
||||||
|
47
Bank/BankEmployeeApp/Views/Home/Operation.cshtml
Normal file
47
Bank/BankEmployeeApp/Views/Home/Operation.cshtml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
|
@model BankContracts.ViewModels.OperationViewModel?
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = Model == null ? "Создание операции" : "Изменение операции";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2 class="display-4">@ViewData["Title"]</h2>
|
||||||
|
</div>
|
||||||
|
<form method="post">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Вид:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="Mark" id="Mark" placeholder="Вид">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Тип:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="Model" id="Model" placeholder="Тип">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Стоимость:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="Price" id="Price" placeholder="Стоимость">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-center mb-2">
|
||||||
|
<input type="submit" value="Создать" class="btn btn-primary" id="submit"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
@if (Model != null)
|
||||||
|
{
|
||||||
|
@section Scripts
|
||||||
|
{
|
||||||
|
<script>
|
||||||
|
$("#submit").val("Изменить");
|
||||||
|
$("#Mark").attr('readonly', true);
|
||||||
|
$("#Mark").val("@Html.Raw(Model.Mark)");
|
||||||
|
$("#Model").attr('readonly', true);
|
||||||
|
$("#Model").val("@Html.Raw(Model.Model)");
|
||||||
|
$("#Price").val("@Html.Raw(Model.Price)");
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
}
|
37
Bank/BankEmployeeApp/Views/Home/Operations.cshtml
Normal file
37
Bank/BankEmployeeApp/Views/Home/Operations.cshtml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
@using BankContracts.ViewModels;
|
||||||
|
|
||||||
|
@model List<OperationViewModel>
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Операция";
|
||||||
|
}
|
||||||
|
<h1>@ViewData["Title"]</h1>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<a asp-action="Operation">Создать новый операцию</a>
|
||||||
|
<table class="table table-striped table-hover" >
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Телефон сотрудника</th>
|
||||||
|
<th>Вид</th>
|
||||||
|
<th>Тип</th>
|
||||||
|
<th>Цена</th>
|
||||||
|
<th>Изменить</th>
|
||||||
|
<th>Удалить</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach (var car in Model)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>@Html.DisplayFor(modelItem => car.EmployeePhoneNumber)</td>
|
||||||
|
<td>@Html.DisplayFor(modelItem => car.Mark)</td>
|
||||||
|
<td>@Html.DisplayFor(modelItem => car.Model)</td>
|
||||||
|
<td>@Html.DisplayFor(modelItem => car.Price)</td>
|
||||||
|
<td><a asp-action="Operation" asp-route-id="@car.Id">Изменить</a></td>
|
||||||
|
<td><a asp-action="RemoveOperation" asp-route-id="@car.Id">Удалить</a></td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
@ -1,6 +1,54 @@
|
|||||||
@{
|
@using BankContracts.ViewModels;
|
||||||
ViewData["Title"] = "Privacy Policy";
|
|
||||||
}
|
|
||||||
<h1>@ViewData["Title"]</h1>
|
|
||||||
|
|
||||||
<p>Use this page to detail your site's privacy policy.</p>
|
@model EmployeeViewModel
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Личные данные сотрудника";
|
||||||
|
}
|
||||||
|
<div>
|
||||||
|
<h2 class="display-4">@ViewData["Title"]</h2>
|
||||||
|
</div>
|
||||||
|
<form method="post">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Номер телефона:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" id="input_phoneNumber" placeholder="Номер телефона" value="@Model.PhoneNumber" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Должность:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" id="input_post" placeholder="должность" value="@Model.Post" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">почта:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" id="input_email" placeholder="почта" value="@Model.Email" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Фамилия:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" id="input_first_name" placeholder="Фамилия" value="@Model.LastName" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Имя:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" id="input_middle_name" placeholder="Имя" value="@Model.FirstName" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-2">Отчество:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" id="input_last_name" placeholder="Отчество" value="@Model.MiddleName" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-2">Пароль:</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" id="password" placeholder="Пароль" value="@Model.Password" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
89
Bank/BankEmployeeApp/Views/Home/Purchases.cshtml
Normal file
89
Bank/BankEmployeeApp/Views/Home/Purchases.cshtml
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
@using BankContracts.ViewModels;
|
||||||
|
@model List<OperationViewModel>
|
||||||
|
@{
|
||||||
|
<h1>@ViewData["Title"]</h1>
|
||||||
|
}
|
||||||
|
<h5>Выбрать операцию, по которым будут включены в отчет сделки</h5>
|
||||||
|
<div class="text-center">
|
||||||
|
<a id="reportToWord" href="javascript:void(0)" onclick="reportToWord();">Отчет в word</a>
|
||||||
|
<a id="reportToExcel" href="javascript:void(0)" onclick="reportToExcel();">Отчет в excel</a>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Включить в отчет</th>
|
||||||
|
<th>Номер телефона сотрудника</th>
|
||||||
|
<th>Вид</th>
|
||||||
|
<th>Тип</th>
|
||||||
|
<th>Стоимость</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach (var car in Model)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input type="checkbox" class="custom-control-input" name="isIncludeInReports" id="@car.Id" checked>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>@car.EmployeePhoneNumber</td>
|
||||||
|
<td>@car.Mark</td>
|
||||||
|
<td>@car.Model</td>
|
||||||
|
<td>@car.Price</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section Scripts
|
||||||
|
{
|
||||||
|
<script>
|
||||||
|
jQuery.ajaxSettings.traditional = true;
|
||||||
|
|
||||||
|
function getIds() {
|
||||||
|
const ids = [];
|
||||||
|
var res = $("input[name=isIncludeInReports]");
|
||||||
|
|
||||||
|
for (var i = 0; i < res.length; i++) {
|
||||||
|
if (res[i].checked) {
|
||||||
|
ids.push(res[i].id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ids;
|
||||||
|
}
|
||||||
|
|
||||||
|
function downloadFile(data, textStatus, request) {
|
||||||
|
var a = document.createElement('a');
|
||||||
|
var url = window.URL.createObjectURL(data);
|
||||||
|
a.href = url;
|
||||||
|
a.download = request.getResponseHeader("content-disposition").split(";")[1].split("=")[1];
|
||||||
|
document.body.append(a);
|
||||||
|
a.click();
|
||||||
|
a.remove();
|
||||||
|
window.URL.revokeObjectURL(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
function reportToWord() {
|
||||||
|
$.get({
|
||||||
|
url: '/Home/ReportPurchasesInWord',
|
||||||
|
xhrFields: {
|
||||||
|
responseType: 'blob'
|
||||||
|
},
|
||||||
|
data: { ids: getIds() },
|
||||||
|
success: downloadFile
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function reportToExcel() {
|
||||||
|
$.get({
|
||||||
|
url: '/Home/ReportPurchasesInExcel',
|
||||||
|
xhrFields: {
|
||||||
|
responseType: 'blob'
|
||||||
|
},
|
||||||
|
data: { ids: getIds() },
|
||||||
|
success: downloadFile
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
}
|
131
Bank/BankEmployeeApp/Views/Home/Register.cshtml
Normal file
131
Bank/BankEmployeeApp/Views/Home/Register.cshtml
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
@{
|
||||||
|
ViewData["Title"] = "Регистрация за сотрудника";
|
||||||
|
}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: linear-gradient(to bottom right, #ff6a00, #ee0979);
|
||||||
|
color: #fff;
|
||||||
|
font-family: 'Arial', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 500px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: rgba(255, 255, 255, 0.8);
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28px;
|
||||||
|
color: #333; /* Изменили цвет главной надписи */
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group label {
|
||||||
|
display: block;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: rgba(255, 255, 255, 0.8);
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #ff6a00;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover {
|
||||||
|
background-color: #ee0979;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.enter-link {
|
||||||
|
display: block;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.enter-link:hover {
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h2 class="title">@ViewData["Title"]</h2>
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="PhoneNumber">Номер телефона:</label>
|
||||||
|
<input type="text" class="form-control" id="PhoneNumber" name="PhoneNumber" placeholder="Номер телефона">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="Email">Почта:</label>
|
||||||
|
<input type="text" class="form-control" id="Email" name="Email" placeholder="Почта">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="FirstName">Фамилия:</label>
|
||||||
|
<input type="text" class="form-control" id="FirstName" name="FirstName" placeholder="Фамилия">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="MiddleName">Имя:</label>
|
||||||
|
<input type="text" class="form-control" id="MiddleName" name="MiddleName" placeholder="Имя">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="LastName">Отчество:</label>
|
||||||
|
<input type="text" class="form-control" id="LastName" name="LastName" placeholder="Отчество">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="Post">Должность:</label>
|
||||||
|
<input type="text" class="form-control" id="Post" name="Post" placeholder="Должность">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="Password">Пароль:</label>
|
||||||
|
<input type="password" class="form-control" id="Password" name="Password" placeholder="Пароль">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<input type="submit" value="Зарегистрироваться" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<a class="enter-link" asp-controller="Authorization" asp-action="Enter">Если вы уже зарегистрированы - войдите.</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
61
Bank/BankEmployeeApp/Views/Home/ReportFromOperations.cshtml
Normal file
61
Bank/BankEmployeeApp/Views/Home/ReportFromOperations.cshtml
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
@using BankContracts.ViewModels;
|
||||||
|
|
||||||
|
@model List<BankContracts.ViewModels.PaymentViewModel>?
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Список операций с оплатами";
|
||||||
|
}
|
||||||
|
<h1>@ViewData["Title"]</h1>
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
<div class="align-content-center row mb-3">
|
||||||
|
<div class="col-sm-auto">
|
||||||
|
<label for="startDate">С:</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-3">
|
||||||
|
<input name="startDate" id="startDate" class="form-control" type="date"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-auto">
|
||||||
|
<label for="endDate">По:</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-3">
|
||||||
|
<input name="endDate" id="endDate" class="form-control" type="date" value="@DateTime.Today.ToString("yyyy-MM-dd")" />
|
||||||
|
</div>
|
||||||
|
<div class="col-2">
|
||||||
|
<input type="submit" name="getReport" class="btn btn-primary" value="Сформировать отчет"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-3">
|
||||||
|
<input type="submit" name="sendToMail" class="btn btn-primary" value="Отправить на почту" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Сделка</th>
|
||||||
|
<th>Вид операции</th>
|
||||||
|
<th>Тип операции</th>
|
||||||
|
<th>Дата оплаты</th>
|
||||||
|
<th>Внесенная оплата</th>
|
||||||
|
<th>Полная оплата</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="fillReportOperations">
|
||||||
|
@if (Model != null)
|
||||||
|
{
|
||||||
|
foreach (var payment in Model)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>@payment.OperationByPurchase.PurchaseId</td>
|
||||||
|
<td>@(payment.Operation?.Model ?? string.Empty)</td>
|
||||||
|
<td>@(payment.Operation?.Mark ?? string.Empty)</td>
|
||||||
|
<td>@(payment.Date.ToShortDateString() ?? string.Empty)</td>
|
||||||
|
<td>@payment.PaidPrice</td>
|
||||||
|
<td>@payment.FullPrice</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
@ -12,21 +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">BankEmployeeApp</a>
|
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Сотрудник Банк "Вы банкрот"</a>
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
|
||||||
aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
|
||||||
<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">Home</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
@ -38,7 +24,7 @@
|
|||||||
|
|
||||||
<footer class="border-top footer text-muted">
|
<footer class="border-top footer text-muted">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
© 2024 - BankEmployeeApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
© 2024 - Сотрудник Банк "Вы банкрот" - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user