From e0f920010b98e2accddc1cc665b7d4628ee8a642 Mon Sep 17 00:00:00 2001 From: Zakharov_Rostislav Date: Sun, 26 May 2024 15:26:28 +0400 Subject: [PATCH] add ReportBindingModel --- .../BusinessLogic/ReportLogic.cs | 13 ++++++++++++- .../BindingModels/ReportBindingModel.cs | 15 +++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 Bank/BankContracts/BindingModels/ReportBindingModel.cs diff --git a/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs b/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs index b855d0b..7c7b043 100644 --- a/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs +++ b/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs @@ -1,4 +1,5 @@ using BankBusinessLogic.OfficePackage; +using BankBusinessLogic.OfficePackage.DocumentModels; using BankContracts.BusinessLogicsContracts; using BankContracts.SearchModels; using BankContracts.StoragesContracts; @@ -37,7 +38,17 @@ namespace BankBusinessLogic.BusinessLogic public List CreateReportRequests(AccountSearchModel model) { return _accountStorage.GetRequestsReport(model); - } + } + + public void SaveRequestsToWordFile(ReportBindingModel model) + { + _saveToWord.CreateDoc(new WordInfo + { + FileName = model.FileName, + Title = "Список кузнечных изделий", + Manufactures = _ManufactureStorage.GetFullList() + }); + } #endregion #region//списки переводов по выбранным картам в формате word и excel diff --git a/Bank/BankContracts/BindingModels/ReportBindingModel.cs b/Bank/BankContracts/BindingModels/ReportBindingModel.cs new file mode 100644 index 0000000..0374c6d --- /dev/null +++ b/Bank/BankContracts/BindingModels/ReportBindingModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BankContracts.BindingModels +{ + public class ReportBindingModel + { + public string FileName { get; set; } = string.Empty; + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } + } +}