From 1f7c4e5d154a90cc883a16f943fd805aea63acbe Mon Sep 17 00:00:00 2001 From: maxnes3 <112558334+maxnes3@users.noreply.github.com> Date: Sat, 8 Apr 2023 18:05:46 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B7=D0=B0=D0=B3=D0=BE=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CaseAccountingBusinessLogic.csproj | 6 ++++++ .../HelperEnums/ExcelStyleInfoType.cs | 15 +++++++++++++++ .../HelperEnums/PdfParagraphAlignmentType.cs | 15 +++++++++++++++ .../HelperEnums/WordJustificationType.cs | 14 ++++++++++++++ .../HelperModels/ExcelCellParameters.cs | 18 ++++++++++++++++++ .../HelperModels/ExcelMergeParameters.cs | 15 +++++++++++++++ .../OfficePackage/HelperModels/PdfParagraph.cs | 16 ++++++++++++++++ .../HelperModels/PdfRowParameters.cs | 16 ++++++++++++++++ .../HelperModels/WordParagraph.cs | 14 ++++++++++++++ .../HelperModels/WordTextProperties.cs | 16 ++++++++++++++++ 10 files changed, 145 insertions(+) create mode 100644 CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/ExcelStyleInfoType.cs create mode 100644 CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs create mode 100644 CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/WordJustificationType.cs create mode 100644 CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/ExcelCellParameters.cs create mode 100644 CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/ExcelMergeParameters.cs create mode 100644 CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/PdfParagraph.cs create mode 100644 CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/PdfRowParameters.cs create mode 100644 CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/WordParagraph.cs create mode 100644 CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/WordTextProperties.cs diff --git a/CaseAccounting/CaseAccountingBusinessLogics/CaseAccountingBusinessLogic.csproj b/CaseAccounting/CaseAccountingBusinessLogics/CaseAccountingBusinessLogic.csproj index 8e556ce..d0f81fd 100644 --- a/CaseAccounting/CaseAccountingBusinessLogics/CaseAccountingBusinessLogic.csproj +++ b/CaseAccounting/CaseAccountingBusinessLogics/CaseAccountingBusinessLogic.csproj @@ -15,4 +15,10 @@ + + + + + + diff --git a/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/ExcelStyleInfoType.cs b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/ExcelStyleInfoType.cs new file mode 100644 index 0000000..744d794 --- /dev/null +++ b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/ExcelStyleInfoType.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopBusinessLogic.OfficePackage.HelperEnums +{ + public enum ExcelStyleInfoType + { + Title, + Text, + TextWithBorder + } +} diff --git a/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs new file mode 100644 index 0000000..89705ef --- /dev/null +++ b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopBusinessLogic.OfficePackage.HelperEnums +{ + public enum PdfParagraphAlignmentType + { + Center, + Left, + Right + } +} diff --git a/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/WordJustificationType.cs b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/WordJustificationType.cs new file mode 100644 index 0000000..8d6e0c8 --- /dev/null +++ b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperEnums/WordJustificationType.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopBusinessLogic.OfficePackage.HelperEnums +{ + public enum WordJustificationType + { + Center, + Both + } +} diff --git a/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/ExcelCellParameters.cs b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/ExcelCellParameters.cs new file mode 100644 index 0000000..5f2b70a --- /dev/null +++ b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/ExcelCellParameters.cs @@ -0,0 +1,18 @@ +using ComputersShopBusinessLogic.OfficePackage.HelperEnums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopBusinessLogic.OfficePackage.HelperModels +{ + public class ExcelCellParameters + { + public string ColumnName { get; set; } = string.Empty; + public uint RowIndex { get; set; } + public string Text { get; set; } = string.Empty; + public string CellReference => $"{ColumnName}{RowIndex}"; + public ExcelStyleInfoType StyleInfo { get; set; } + } +} diff --git a/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/ExcelMergeParameters.cs b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/ExcelMergeParameters.cs new file mode 100644 index 0000000..067ab3a --- /dev/null +++ b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/ExcelMergeParameters.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopBusinessLogic.OfficePackage.HelperModels +{ + public class ExcelMergeParameters + { + public string CellFromName { get; set; } = string.Empty; + public string CellToName { get; set; } = string.Empty; + public string Merge => $"{CellFromName}:{CellToName}"; + } +} diff --git a/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/PdfParagraph.cs b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/PdfParagraph.cs new file mode 100644 index 0000000..3dd00cb --- /dev/null +++ b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/PdfParagraph.cs @@ -0,0 +1,16 @@ +using ComputersShopBusinessLogic.OfficePackage.HelperEnums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopBusinessLogic.OfficePackage.HelperModels +{ + public class PdfParagraph + { + public string Text { get; set; } = string.Empty; + public string Style { get; set; } = string.Empty; + public PdfParagraphAlignmentType ParagraphAlignment { get; set; } + } +} diff --git a/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/PdfRowParameters.cs b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/PdfRowParameters.cs new file mode 100644 index 0000000..566f870 --- /dev/null +++ b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/PdfRowParameters.cs @@ -0,0 +1,16 @@ +using ComputersShopBusinessLogic.OfficePackage.HelperEnums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopBusinessLogic.OfficePackage.HelperModels +{ + public class PdfRowParameters + { + public List Texts { get; set; } = new(); + public string Style { get; set; } = string.Empty; + public PdfParagraphAlignmentType ParagraphAlignment { get; set; } + } +} diff --git a/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/WordParagraph.cs b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/WordParagraph.cs new file mode 100644 index 0000000..6a20259 --- /dev/null +++ b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/WordParagraph.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopBusinessLogic.OfficePackage.HelperModels +{ + public class WordParagraph + { + public List<(string, WordTextProperties)> Texts { get; set; } = new(); + public WordTextProperties? TextProperties { get; set; } + } +} diff --git a/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/WordTextProperties.cs b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/WordTextProperties.cs new file mode 100644 index 0000000..a29117e --- /dev/null +++ b/CaseAccounting/CaseAccountingBusinessLogics/OfficePackage/HelperModels/WordTextProperties.cs @@ -0,0 +1,16 @@ +using ComputersShopBusinessLogic.OfficePackage.HelperEnums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopBusinessLogic.OfficePackage.HelperModels +{ + public class WordTextProperties + { + public string Size { get; set; } = string.Empty; + public bool Bold { get; set; } + public WordJustificationType JustificationType { get; set; } + } +}