добавила общие классы для работы с вордом, экселем и пдф

This commit is contained in:
Елена Бакальская 2024-05-23 20:10:20 +04:00
parent 5a05bebae3
commit b13b15c597
10 changed files with 66 additions and 26 deletions

View File

@ -1,10 +1,4 @@
using System; namespace PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperEnums
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperEnums
{ {
public enum PdfParagraphAlignmentType public enum PdfParagraphAlignmentType
{ {

View File

@ -1,10 +1,4 @@
using System; namespace PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperEnums
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperEnums
{ {
public enum WordJustificationType public enum WordJustificationType
{ {

View File

@ -0,0 +1,13 @@
using PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperEnums;
namespace PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperModels.Excel
{
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; }
}
}

View File

@ -0,0 +1,9 @@
namespace PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperModels.Excel
{
public class ExcelMergeParameters
{
public string CellFromName { get; set; } = string.Empty;
public string CellToName { get; set; } = string.Empty;
public string Merge => $"{CellFromName}:{CellToName}";
}
}

View File

@ -0,0 +1,11 @@
using PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperEnums;
namespace PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperModels.PDF
{
public class PdfParagraph
{
public string Text { get; set; } = string.Empty;
public string Style { get; set; } = string.Empty;
public PdfParagraphAlignmentType ParagraphAlignment { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperEnums;
namespace PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperModels.PDF
{
public class PdfRowParameters
{
public List<string> Texts { get; set; } = new();
public string Style { get; set; } = string.Empty;
public PdfParagraphAlignmentType ParagraphAlignment { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperModels.Word
{
public class WordParagraph
{
public List<(string, WordTextProperties)> Texts { get; set; } = new();
public WordTextProperties? TextProperties { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperEnums;
namespace PolyclinicBusinessLogic.BusinessLogics.OfficePackage.HelperModels.Word
{
public class WordTextProperties
{
public string Size { get; set; } = string.Empty;
public bool Bold { get; set; }
public WordJustificationType JustificationType { get; set; }
}
}

View File

@ -15,8 +15,4 @@
<ProjectReference Include="..\PolyclinicDatabaseImplement\PolyclinicDatabaseImplement.csproj" /> <ProjectReference Include="..\PolyclinicDatabaseImplement\PolyclinicDatabaseImplement.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="BusinessLogics\OfficePackage\HelperModels\" />
</ItemGroup>
</Project> </Project>

View File

@ -1,11 +1,4 @@
using PolyclinicDataModels.Models; namespace PolyclinicContracts.ViewModels
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.ViewModels
{ {
public class ReportProceduresViewModel public class ReportProceduresViewModel
{ {