Исполнитель: сделал пдф и ворд

This commit is contained in:
Yunusov_Niyaz 2024-05-02 10:59:47 +04:00
parent 064ece5ecc
commit 1700333bfb
5 changed files with 71 additions and 4 deletions

View File

@ -0,0 +1,22 @@
using VeterinaryBusinessLogic.OfficePackage.HelperModels;
namespace VeterinaryBusinessLogic.OfficePackage
{
public abstract class AbstractSaveToPdf
{
/// Создание pdf-файла
protected abstract void CreatePdf(PdfInfo info);
/// Создание параграфа с текстом
protected abstract void CreateParagraph(PdfParagraph paragraph);
/// Создание таблицы
protected abstract void CreateTable(List<string> columns);
/// Создание и заполнение строки
protected abstract void CreateRow(PdfRowParameters rowParameters);
/// Сохранение файла
protected abstract void SavePdf(PdfInfo info);
}
}

View File

@ -0,0 +1,19 @@
using VeterinaryBusinessLogic.OfficePackage.HelperModels;
namespace VeterinaryBusinessLogic.OfficePackage
{
public abstract class AbstractSaveToWord
{
/// Создание doc-файла
protected abstract void CreateWord(WordInfo info);
/// Создание абзаца с текстом
protected abstract void CreateParagraph(WordParagraph paragraph);
///Создание таблицы
protected abstract void CreateTable(WordParagraph paragraph);
/// Сохранение файла
protected abstract void SaveWord(WordInfo info);
}
}

View File

@ -0,0 +1,15 @@
using MigraDoc.DocumentObjectModel;
using MigraDoc.DocumentObjectModel.Tables;
using MigraDoc.Rendering;
namespace VeterinaryBusinessLogic.OfficePackage.Implements
{
public class SaveToPdf
{
private Document? _document;
private Section? _section;
private Table? _table;
}
}

View File

@ -0,0 +1,13 @@
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
namespace VeterinaryBusinessLogic.OfficePackage.Implements
{
public class SaveToWord
{
private WordprocessingDocument? _wordDocument;
private Body? _docBody;
}
}

View File

@ -7,15 +7,13 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DocumentFormat.OpenXml" Version="3.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="PdfSharp.MigraDoc.Standard" Version="1.51.15" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VeterinaryContracts\VeterinaryContracts.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="OfficePackage\Implements\" />
</ItemGroup>
</Project>