diff --git a/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs b/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs index fe4fb8b..2778ce6 100644 --- a/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs +++ b/Bank/BankBusinessLogic/BusinessLogic/ReportLogic.cs @@ -66,10 +66,23 @@ namespace BankBusinessLogic.BusinessLogic _saveToWord.CreateDoc(new WordInfo { FileName = model.FileName, - Title = "Список кузнечных изделий", + Title = "Список переводов", Transfers = CreateReportTransfers(new CardSearchModel { - SelectedCardIds = model.S + SelectedCardIds = model.SelectedCardIds + }) + }); + } + + public void SaveTransfersToExcelFile(ReportBindingModel model) + { + _saveToExcel.CreateReport(new ExcelInfo + { + FileName = model.FileName, + Title = "Список переводов", + Transfers = CreateReportTransfers(new CardSearchModel + { + SelectedCardIds = model.SelectedCardIds }) }); } @@ -80,6 +93,22 @@ namespace BankBusinessLogic.BusinessLogic { return _cardStorage.GetReportOperationsRequestsList(model); } + + public void SaveOperationsRequestsToPdfFile(ReportBindingModel model) + { + _saveToPdf.CreateDoc(new PdfInfo + { + FileName = model.FileName, + Title = "Отчет по картам", + DateFrom = model.DateFrom!.Value, + DateTo = model.DateTo!.Value, + OperationsRequests = CreateReportOperationsRequests(new CardSearchModel + { + DateFrom = model.DateFrom!.Value, + DateTo = model.DateTo!.Value, + }) + }); + } #endregion #region//отчеты по счетам за период с расшифровкой по переводам и выдачам в формате pdf diff --git a/Bank/BankContracts/BindingModels/ReportBindingModel.cs b/Bank/BankContracts/BindingModels/ReportBindingModel.cs index 1259118..532aafa 100644 --- a/Bank/BankContracts/BindingModels/ReportBindingModel.cs +++ b/Bank/BankContracts/BindingModels/ReportBindingModel.cs @@ -12,5 +12,6 @@ namespace BankContracts.BindingModels public DateTime? DateFrom { get; set; } public DateTime? DateTo { get; set; } public List? SelectedAccountIds { get; set; } + public List? SelectedCardIds { get; set; } } }