оно работает
This commit is contained in:
parent
13f475d64b
commit
9e470873d8
@ -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,
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user