добавил зависимость

This commit is contained in:
Artyom_Yashin 2024-05-26 18:18:17 +04:00
parent bee9621cba
commit ca859d9bc5
3 changed files with 8 additions and 5 deletions

View File

@ -521,13 +521,13 @@ namespace BankClientApp.Controllers
switch (format)
{
case "word":
APIClient.PostRequest<ReportBindingModel>($"api/report/savetransferstoword", new ReportBindingModel
APIClient.PostRequest($"api/report/savetransferstoword", new ReportBindingModel
{
SelectedCardIds = cards,
});
break;
case "excel":
APIClient.PostRequest<ReportBindingModel>($"api/report/savetransferstoword", new ReportBindingModel
APIClient.PostRequest($"api/report/savetransferstoword", new ReportBindingModel
{
SelectedCardIds = cards,
});

View File

@ -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]

View File

@ -37,6 +37,8 @@ builder.Services.AddTransient<IRequestLogic, RequestLogic>();
builder.Services.AddTransient<IWithdrawalStorage, WithdrawalStorage>();
builder.Services.AddTransient<IWithdrawalLogic, WithdrawalLogic>();
builder.Services.AddTransient<IReportLogic, ReportLogic>();
builder.Services.AddTransient<AbstractSaveToPdf, SaveToPdf>();
builder.Services.AddTransient<AbstractSaveToWord, SaveToWord>();
builder.Services.AddTransient<AbstractSaveToExcel, SaveToExcel>();