создание пдфки не работает
This commit is contained in:
parent
d43bff822f
commit
66292d362b
@ -152,7 +152,7 @@ namespace HardwareShopContracts.BusinessLogicsContracts
|
||||
/// <param name="model"></param>
|
||||
public void SendByMailPurchaseReport(ReportBindingModel model)
|
||||
{
|
||||
byte[] file = _saveToPdf.GetEquipmentReportFile(new()
|
||||
byte[] file = _saveToPdf.GetPurchaseReportFile(new()
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Отчет по покупкам",
|
||||
|
@ -7,7 +7,7 @@ namespace HardwareShopBusinessLogic.OfficePackage
|
||||
{
|
||||
public abstract class AbstractSaveToPdf
|
||||
{
|
||||
public byte[] GetEquipmentReportFile(PdfInfo info)
|
||||
public byte[] GetPurchaseReportFile(PdfInfo info)
|
||||
{
|
||||
CreatePdf(info);
|
||||
|
||||
@ -26,11 +26,11 @@ namespace HardwareShopBusinessLogic.OfficePackage
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||
});
|
||||
|
||||
CreateTable(new List<string> { "5cm", "5cm", "5cm" });
|
||||
CreateTable(new List<string> { "5cm", "5cm", "5cm", "5cm", "5cm" });
|
||||
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { "Комплектация", "Автомобили", "Работы" },
|
||||
Texts = new List<string> { "Покупка", "Дата покупки", "Цена", "Комментарии", "Комплектующие" },
|
||||
Style = "NormalTitle",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||
});
|
||||
|
@ -1,23 +0,0 @@
|
||||
using HardwareShopContracts.BindingModels;
|
||||
using HardwareShopContracts.BusinessLogicsContracts;
|
||||
using HardwareShopContracts.SearchModels;
|
||||
using HardwareShopContracts.ViewModels;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace HardwareShopRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class WorkerReport : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly IWorkerReportLogic _workerReportLogic;
|
||||
|
||||
public WorkerReport(IWorkerReportLogic workerReportLogic, ILogger<UserController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
_workerReportLogic = workerReportLogic;
|
||||
}
|
||||
}
|
||||
}
|
@ -562,6 +562,7 @@ namespace HardwareShopWorkerApp.Controllers
|
||||
return;
|
||||
}
|
||||
reportModel.UserId = APIClient.User.Id;
|
||||
reportModel.UserEmail = APIClient.User.Email;
|
||||
APIClient.PostRequest("api/report/SendByMailPurchaseReport", reportModel);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user