From 1700333bfb3b10cfc9df9df5a9e29f06c3b18cff Mon Sep 17 00:00:00 2001 From: Yunusov_Niyaz Date: Thu, 2 May 2024 10:59:47 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8?= =?UTF-8?q?=D1=82=D0=B5=D0=BB=D1=8C:=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0?= =?UTF-8?q?=D0=BB=20=D0=BF=D0=B4=D1=84=20=D0=B8=20=D0=B2=D0=BE=D1=80=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OfficePackage/AbstractSaveToPdf.cs | 22 +++++++++++++++++++ .../OfficePackage/AbstractSaveToWord.cs | 19 ++++++++++++++++ .../OfficePackage/Implements/SaveToPdf.cs | 15 +++++++++++++ .../OfficePackage/Implements/SaveToWord.cs | 13 +++++++++++ .../VeterinaryBusinessLogic.csproj | 6 ++--- 5 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 VeterinaryView/VeterinaryBusinessLogic/OfficePackage/AbstractSaveToPdf.cs create mode 100644 VeterinaryView/VeterinaryBusinessLogic/OfficePackage/AbstractSaveToWord.cs create mode 100644 VeterinaryView/VeterinaryBusinessLogic/OfficePackage/Implements/SaveToPdf.cs create mode 100644 VeterinaryView/VeterinaryBusinessLogic/OfficePackage/Implements/SaveToWord.cs diff --git a/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/AbstractSaveToPdf.cs b/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/AbstractSaveToPdf.cs new file mode 100644 index 0000000..11d3bfd --- /dev/null +++ b/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/AbstractSaveToPdf.cs @@ -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 columns); + + /// Создание и заполнение строки + protected abstract void CreateRow(PdfRowParameters rowParameters); + + /// Сохранение файла + protected abstract void SavePdf(PdfInfo info); + } +} diff --git a/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/AbstractSaveToWord.cs b/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/AbstractSaveToWord.cs new file mode 100644 index 0000000..95b25e0 --- /dev/null +++ b/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/AbstractSaveToWord.cs @@ -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); + } +} diff --git a/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/Implements/SaveToPdf.cs b/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/Implements/SaveToPdf.cs new file mode 100644 index 0000000..b804a26 --- /dev/null +++ b/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/Implements/SaveToPdf.cs @@ -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; + } +} diff --git a/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/Implements/SaveToWord.cs b/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/Implements/SaveToWord.cs new file mode 100644 index 0000000..c068a11 --- /dev/null +++ b/VeterinaryView/VeterinaryBusinessLogic/OfficePackage/Implements/SaveToWord.cs @@ -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; + + } +} diff --git a/VeterinaryView/VeterinaryBusinessLogic/VeterinaryBusinessLogic.csproj b/VeterinaryView/VeterinaryBusinessLogic/VeterinaryBusinessLogic.csproj index cb0a8ba..8af590c 100644 --- a/VeterinaryView/VeterinaryBusinessLogic/VeterinaryBusinessLogic.csproj +++ b/VeterinaryView/VeterinaryBusinessLogic/VeterinaryBusinessLogic.csproj @@ -7,15 +7,13 @@ + + - - - -