From 0a5f6483e06ed8600b4e7a2a6d8b9fddc23edc55 Mon Sep 17 00:00:00 2001 From: Zakharov_Rostislav Date: Sun, 26 May 2024 15:31:18 +0400 Subject: [PATCH] fix ReportBindingModel --- Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs | 8 ++++++-- .../OfficePackage/DocumentModels/WordInfo.cs | 3 ++- Bank/BankContracts/BindingModels/ReportBindingModel.cs | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs b/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs index 7c7b043..eb10163 100644 --- a/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs +++ b/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs @@ -1,5 +1,6 @@ using BankBusinessLogic.OfficePackage; using BankBusinessLogic.OfficePackage.DocumentModels; +using BankContracts.BindingModels; using BankContracts.BusinessLogicsContracts; using BankContracts.SearchModels; using BankContracts.StoragesContracts; @@ -45,8 +46,11 @@ namespace BankBusinessLogic.BusinessLogic _saveToWord.CreateDoc(new WordInfo { FileName = model.FileName, - Title = "Список кузнечных изделий", - Manufactures = _ManufactureStorage.GetFullList() + Title = "Список заявок", + Requests = CreateReportRequests(new AccountSearchModel + { + SelectedAccountIds = model.SelectedAccountIds, + }), }); } #endregion diff --git a/Bank/BankBusinessLogic/OfficePackage/DocumentModels/WordInfo.cs b/Bank/BankBusinessLogic/OfficePackage/DocumentModels/WordInfo.cs index 03ae047..fb6bf1a 100644 --- a/Bank/BankBusinessLogic/OfficePackage/DocumentModels/WordInfo.cs +++ b/Bank/BankBusinessLogic/OfficePackage/DocumentModels/WordInfo.cs @@ -12,5 +12,6 @@ namespace BankBusinessLogic.OfficePackage.DocumentModels public string FileName { get; set; } = string.Empty; public string Title { get; set; } = string.Empty; public List Transfers { get; set; } = new(); - } + public List Requests { get; set; } = new(); + } } diff --git a/Bank/BankContracts/BindingModels/ReportBindingModel.cs b/Bank/BankContracts/BindingModels/ReportBindingModel.cs index 0374c6d..1259118 100644 --- a/Bank/BankContracts/BindingModels/ReportBindingModel.cs +++ b/Bank/BankContracts/BindingModels/ReportBindingModel.cs @@ -11,5 +11,6 @@ namespace BankContracts.BindingModels public string FileName { get; set; } = string.Empty; public DateTime? DateFrom { get; set; } public DateTime? DateTo { get; set; } + public List? SelectedAccountIds { get; set; } } }