diff --git a/Bank/BankClientApp/Controllers/HomeController.cs b/Bank/BankClientApp/Controllers/HomeController.cs index 8c5b290..a3733d9 100644 --- a/Bank/BankClientApp/Controllers/HomeController.cs +++ b/Bank/BankClientApp/Controllers/HomeController.cs @@ -491,7 +491,7 @@ namespace BankClientApp.Controllers #endregion #region//работа с отчетами - [HttpGet] + [HttpGet] public IActionResult Report() { if (APIClient.Client == null) @@ -501,6 +501,24 @@ namespace BankClientApp.Controllers return View(); } + [HttpPost] + public void Report(DateTime dateFrom, DateTime dateTo) + { + if (APIClient.Client == null) + { + throw new Exception("Вы как суда попали? Суда вход только авторизованным"); + } + APIClient.PostRequest("api/report/sandoperationsrequeststoemail", new ReportBindingModel + { + FileName = "C:\\ReportsCourseWork\\pdffile.pdf", + DateFrom = dateFrom, + DateTo = dateTo, + Email = APIClient.Client.Email + }); + Response.Redirect("Report"); + + } + [HttpGet] public IActionResult TransferListReport() { diff --git a/Bank/BankClientApp/Views/Home/Report.cshtml b/Bank/BankClientApp/Views/Home/Report.cshtml index 5e82fe7..06bde4d 100644 --- a/Bank/BankClientApp/Views/Home/Report.cshtml +++ b/Bank/BankClientApp/Views/Home/Report.cshtml @@ -2,27 +2,30 @@ ViewData["Title"] = "Report"; }