оно работает

This commit is contained in:
Николай 2023-05-18 20:38:05 +04:00
parent 13f475d64b
commit 9e470873d8
4 changed files with 12 additions and 3 deletions

View File

@ -152,6 +152,7 @@ namespace HardwareShopContracts.BusinessLogicsContracts
/// <param name="model"></param>
public void SendByMailPurchaseReport(ReportBindingModel model)
{
model.FileName = "temp.pdf";
_saveToPdf.GetPurchaseReportFile(new()
{
FileName = model.FileName,

View File

@ -26,7 +26,7 @@ namespace HardwareShopBusinessLogic.OfficePackage
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
CreateTable(new List<string> { "5cm", "5cm", "5cm", "5cm", "5cm" });
CreateTable(new List<string> { "3cm", "4cm", "3cm", "4cm", "4cm" });
CreateRow(new PdfRowParameters
{

View File

@ -10,7 +10,7 @@ namespace HardwareShopDatabaseImplement
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseNpgsql("Host=localhost;Port=5433;Database=Computer_Hardware_Store;Username=user;Password=12345");
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=Computer_Hardware_Store4;Username=postgres;Password=1234");
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
}

View File

@ -122,7 +122,15 @@ namespace HardwareShopRestApi.Controllers
[HttpPost]
public void SendByMailPurchaseReport(ReportBindingModel reportModel)
{
_reportWorkerLogic.SendByMailPurchaseReport(reportModel);
try
{
_reportWorkerLogic.SendByMailPurchaseReport(reportModel);
}
catch (Exception ex)
{
_logger.LogError(ex, "Ошибка получения сведений по полученным пользователем комплектующим за период");
throw;
}
}
}