From 583c381d42a2977112a29d99905bd44b6dc59e41 Mon Sep 17 00:00:00 2001 From: Artyom_Yashin Date: Sun, 26 May 2024 21:59:33 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=B8?= =?UTF-8?q?=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OfficePackage/AbstractSaveToExcel.cs | 5 ++--- Bank/BankClientApp/Controllers/HomeController.cs | 9 +++------ Bank/BankClientApp/Views/Home/RequestCreate.cshtml | 2 +- Bank/BankClientApp/Views/Home/TransferListReport.cshtml | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Bank/BankBusinessLogic/OfficePackage/AbstractSaveToExcel.cs b/Bank/BankBusinessLogic/OfficePackage/AbstractSaveToExcel.cs index fcb7fca..81bc993 100644 --- a/Bank/BankBusinessLogic/OfficePackage/AbstractSaveToExcel.cs +++ b/Bank/BankBusinessLogic/OfficePackage/AbstractSaveToExcel.cs @@ -101,15 +101,14 @@ namespace BankBusinessLogic.OfficePackage StyleInfo = ExcelStyleInfoType.Text }); rowIndex++; - foreach (var component in transfer.Transfers) + foreach (var transfer in transfer.Transfers) { InsertCellInWorksheet(new ExcelCellParameters { ColumnName = "B", RowIndex = rowIndex, Text = "", - StyleInfo = - ExcelStyleInfoType.TextWithBroder + StyleInfo = ExcelStyleInfoType.TextWithBroder }); InsertCellInWorksheet(new ExcelCellParameters { diff --git a/Bank/BankClientApp/Controllers/HomeController.cs b/Bank/BankClientApp/Controllers/HomeController.cs index bc77f42..5fe088e 100644 --- a/Bank/BankClientApp/Controllers/HomeController.cs +++ b/Bank/BankClientApp/Controllers/HomeController.cs @@ -246,8 +246,6 @@ namespace BankClientApp.Controllers { return Redirect("~/Home/Enter"); } - List? list = APIClient.GetRequest>($"api/card/getcardlist?clientid={APIClient.Client.Id}"); - ViewBag.Cards = list; ViewBag.SenderCards = APIClient.GetRequest>($"api/card/getcardlist?clientid={APIClient.Client.Id}"); ViewBag.RecipientCards = APIClient.GetRequest>($"api/card/getcardlist?clientid={null}"); @@ -530,18 +528,17 @@ namespace BankClientApp.Controllers FileName = "C:\\Users\\123\\Desktop\\wordfile.docx", SelectedCardIds = cards, }); - Response.Redirect("TransferListReport"); break; case "excel": - APIClient.PostRequest($"api/report/savetransferstoword", new ReportBindingModel + APIClient.PostRequest($"api/report/savetransferstoexcel", new ReportBindingModel { - FileName = "C:\\Users\\123\\Desktop\\wordfile.docx", + FileName = "C:\\Users\\123\\Desktop\\excelfile.xls", SelectedCardIds = cards, }); - Response.Redirect("TransferListReport"); break; default: break; } + Response.Redirect("TransferListReport"); } #endregion diff --git a/Bank/BankClientApp/Views/Home/RequestCreate.cshtml b/Bank/BankClientApp/Views/Home/RequestCreate.cshtml index 07b1a9d..8d6baff 100644 --- a/Bank/BankClientApp/Views/Home/RequestCreate.cshtml +++ b/Bank/BankClientApp/Views/Home/RequestCreate.cshtml @@ -2,7 +2,7 @@ ViewData["Title"] = "RequestCreate"; }
-

Создание заапроса

+

Создание запроса

diff --git a/Bank/BankClientApp/Views/Home/TransferListReport.cshtml b/Bank/BankClientApp/Views/Home/TransferListReport.cshtml index 91fe67b..7e69ad4 100644 --- a/Bank/BankClientApp/Views/Home/TransferListReport.cshtml +++ b/Bank/BankClientApp/Views/Home/TransferListReport.cshtml @@ -20,7 +20,7 @@
- +