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