From ca859d9bc5364505164ef1abee262926209f4688 Mon Sep 17 00:00:00 2001 From: Artyom_Yashin Date: Sun, 26 May 2024 18:18:17 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bank/BankClientApp/Controllers/HomeController.cs | 4 ++-- Bank/BankRestApi/Controllers/ReportController.cs | 7 ++++--- Bank/BankRestApi/Program.cs | 2 ++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Bank/BankClientApp/Controllers/HomeController.cs b/Bank/BankClientApp/Controllers/HomeController.cs index 38bd465..38711f5 100644 --- a/Bank/BankClientApp/Controllers/HomeController.cs +++ b/Bank/BankClientApp/Controllers/HomeController.cs @@ -521,13 +521,13 @@ namespace BankClientApp.Controllers switch (format) { case "word": - APIClient.PostRequest($"api/report/savetransferstoword", new ReportBindingModel + APIClient.PostRequest($"api/report/savetransferstoword", new ReportBindingModel { SelectedCardIds = cards, }); break; case "excel": - APIClient.PostRequest($"api/report/savetransferstoword", new ReportBindingModel + APIClient.PostRequest($"api/report/savetransferstoword", new ReportBindingModel { SelectedCardIds = cards, }); diff --git a/Bank/BankRestApi/Controllers/ReportController.cs b/Bank/BankRestApi/Controllers/ReportController.cs index 6d1cd25..d990f21 100644 --- a/Bank/BankRestApi/Controllers/ReportController.cs +++ b/Bank/BankRestApi/Controllers/ReportController.cs @@ -28,15 +28,16 @@ namespace BankRestApi.Controllers } [HttpPost] - public void SaveTransfersToWord(ReportBindingModel? model) + public void SaveTransfersToWord(ReportBindingModel model) { try { - _logic.(model); + _logic.SaveTransfersToWordFile(model); } catch(Exception ex) { - + _logger.LogError(ex, "Ошибка сохранения переводов в ворд"); + throw; } } [HttpPost] diff --git a/Bank/BankRestApi/Program.cs b/Bank/BankRestApi/Program.cs index b0191c9..a550dd8 100644 --- a/Bank/BankRestApi/Program.cs +++ b/Bank/BankRestApi/Program.cs @@ -37,6 +37,8 @@ builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); +builder.Services.AddTransient(); + builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient();