Работает сохранеине отчета в PDF
This commit is contained in:
parent
55d2673127
commit
34505a9328
@ -19,18 +19,18 @@ namespace PolyclinicBusinessLogic.BusinessLogics
|
||||
private readonly ICourseStorage _courseStorage;
|
||||
private readonly ISymptomStorage _symptomStorage;
|
||||
|
||||
private readonly AbstractReportDiagnosesByPeriodSaveToExcel _saveToExcel;
|
||||
private readonly AbstractReportDiagnosesByPeriodSaveToWord _saveToWord;
|
||||
private readonly AbstractReportMedicamentsByDiagnosesSaveToPdf _saveToPdf;
|
||||
private readonly AbstractReportMedicamentsByDiagnosesSaveToExcel _saveToExcel;
|
||||
private readonly AbstractReportMedicamentsByDiagnosesSaveToWord _saveToWord;
|
||||
private readonly AbstractReportDiagnosesByPeriodSaveToPdf _saveToPdf;
|
||||
|
||||
public ImplementerReportLogic(
|
||||
IDiagnoseStorage diagnoseStorage,
|
||||
IMedicamentStorage medicamentStorage,
|
||||
ICourseStorage courseStorage,
|
||||
ISymptomStorage symptomStorage,
|
||||
AbstractReportDiagnosesByPeriodSaveToWord saveToWord,
|
||||
AbstractReportMedicamentsByDiagnosesSaveToPdf saveToPdf,
|
||||
AbstractReportDiagnosesByPeriodSaveToExcel saveToExcel)
|
||||
AbstractReportMedicamentsByDiagnosesSaveToWord saveToWord,
|
||||
AbstractReportDiagnosesByPeriodSaveToPdf saveToPdf,
|
||||
AbstractReportMedicamentsByDiagnosesSaveToExcel saveToExcel)
|
||||
{
|
||||
_diagnoseStorage = diagnoseStorage;
|
||||
_medicamentStorage = medicamentStorage;
|
||||
|
@ -4,7 +4,7 @@ using PolyclinicContracts.ViewModels;
|
||||
|
||||
namespace PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports
|
||||
{
|
||||
public abstract class AbstractReportMedicamentsByDiagnosesSaveToPdf
|
||||
public abstract class AbstractReportDiagnosesByPeriodSaveToPdf
|
||||
{
|
||||
public void CreateDoc(PdfDiagnosesByPeriodInfo info)
|
||||
{
|
||||
@ -21,10 +21,10 @@ namespace PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||
});
|
||||
CreateTable(new List<string> { "2cm", "3cm", "3cm", "4cm", "4cm", "4cm" });
|
||||
CreateTable(new List<string> { "1cm", "4cm", "3cm", "3cm", "4cm", "4cm" });
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { "Номер", "Название", "Начало", "Конец", "Симптомы", "Курсы" },
|
||||
Texts = new List<string> { "#", "Название", "Начало", "Конец", "Симптомы", "Курсы" },
|
||||
Style = "NormalTitle",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||
});
|
||||
@ -37,8 +37,8 @@ namespace PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports
|
||||
{
|
||||
diagnose.Id.ToString(),
|
||||
diagnose.Name,
|
||||
diagnose.DateStartDiagnose.ToShortTimeString(),
|
||||
diagnose.DateStopDiagnose?.ToShortTimeString() ?? "нет даты окончания процедуры",
|
||||
diagnose.DateStartDiagnose.ToShortDateString(),
|
||||
diagnose.DateStopDiagnose?.ToShortDateString() ?? string.Empty,
|
||||
"",
|
||||
""
|
||||
},
|
@ -4,7 +4,7 @@ using PolyclinicBusinessLogic.OfficePackage.HelperModels.Excel;
|
||||
|
||||
namespace PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports
|
||||
{
|
||||
public abstract class AbstractReportDiagnosesByPeriodSaveToExcel
|
||||
public abstract class AbstractReportMedicamentsByDiagnosesSaveToExcel
|
||||
{
|
||||
public void CreateReport(ReportMedicamentsByDiagnosesInfo info)
|
||||
{
|
@ -4,7 +4,7 @@ using PolyclinicBusinessLogic.OfficePackage.HelperModels.Word;
|
||||
|
||||
namespace PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports
|
||||
{
|
||||
public abstract class AbstractReportDiagnosesByPeriodSaveToWord
|
||||
public abstract class AbstractReportMedicamentsByDiagnosesSaveToWord
|
||||
{
|
||||
public void CreateDoc(ReportMedicamentsByDiagnosesInfo info)
|
||||
{
|
@ -1,4 +1,5 @@
|
||||
using MigraDoc.DocumentObjectModel;
|
||||
using MigraDoc.DocumentObjectModel.Tables;
|
||||
using MigraDoc.Rendering;
|
||||
using PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports;
|
||||
using PolyclinicBusinessLogic.OfficePackage.HelperEnums;
|
||||
@ -6,7 +7,7 @@ using PolyclinicBusinessLogic.OfficePackage.HelperModels.PDF;
|
||||
|
||||
namespace PolyclinicBusinessLogic.OfficePackage.Implements.ImplementerReports
|
||||
{
|
||||
public class ReportMedicamentsByDiagnosesSaveToPdf : AbstractReportMedicamentsByDiagnosesSaveToPdf
|
||||
public class ReportDiagnosesByPeriodSaveToPdf : AbstractReportDiagnosesByPeriodSaveToPdf
|
||||
{
|
||||
private Document? _document;
|
||||
private Section? _section;
|
@ -10,7 +10,7 @@ using PolyclinicBusinessLogic.OfficePackage.HelperModels;
|
||||
|
||||
namespace PolyclinicBusinessLogic.OfficePackage.Implements.ImplementerReports
|
||||
{
|
||||
public class ReportDiagnosesByPeriodSaveToExcel : AbstractReportDiagnosesByPeriodSaveToExcel
|
||||
public class ReportMedicamentsByDiagnosesSaveToExcel : AbstractReportMedicamentsByDiagnosesSaveToExcel
|
||||
{
|
||||
private SpreadsheetDocument? _spreadsheetDocument;
|
||||
private SharedStringTablePart? _shareStringPart;
|
@ -8,7 +8,7 @@ using PolyclinicBusinessLogic.OfficePackage.HelperModels.Word;
|
||||
|
||||
namespace PolyclinicBusinessLogic.OfficePackage.Implements.ImplementerReports
|
||||
{
|
||||
public class ReportDiagnosesByPeriodSaveToWord : AbstractReportDiagnosesByPeriodSaveToWord
|
||||
public class ReportMedicamentsByDiagnosesSaveToWord : AbstractReportMedicamentsByDiagnosesSaveToWord
|
||||
{
|
||||
private WordprocessingDocument? _wordDocument;
|
||||
private Body? _docBody;
|
@ -1,5 +1,6 @@
|
||||
using PolyclinicBusinessLogic.BusinessLogics;
|
||||
using PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports;
|
||||
using PolyclinicBusinessLogic.OfficePackage.Implements.ImplementerReports;
|
||||
using PolyclinicContracts.BusinessLogicsContracts;
|
||||
using PolyclinicContracts.StoragesContracts;
|
||||
using PolyclinicDatabaseImplement.Implements;
|
||||
@ -31,9 +32,9 @@ builder.Services.AddTransient<IProcedureStorage, ProcedureStorage>();
|
||||
builder.Services.AddTransient<IMedicamentStorage, MedicamentStorage>();
|
||||
builder.Services.AddTransient<IRecipeStorage, RecipeStorage>();
|
||||
|
||||
builder.Services.AddTransient<AbstractReportDiagnosesByPeriodSaveToExcel, ReportDiagnosesByPerioSave>();
|
||||
builder.Services.AddTransient<AbstractReportDiagnosesByPeriodSaveToWord, AbstractReportDiagnosesByPeriodSaveToWord>();
|
||||
builder.Services.AddTransient<AbstractReportMedicamentsByDiagnosesSaveToPdf, AbstractReportMedicamentsByDiagnosesSaveToPdf>();
|
||||
builder.Services.AddTransient<AbstractReportMedicamentsByDiagnosesSaveToExcel, ReportMedicamentsByDiagnosesSaveToExcel>();
|
||||
builder.Services.AddTransient<AbstractReportMedicamentsByDiagnosesSaveToWord, ReportMedicamentsByDiagnosesSaveToWord>();
|
||||
builder.Services.AddTransient<AbstractReportDiagnosesByPeriodSaveToPdf, ReportDiagnosesByPeriodSaveToPdf>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user