добавление наслодований и изменение библиотек в офисных пакетах

This commit is contained in:
FLARJ 2023-04-08 23:26:18 +04:00
parent 285df1a7d8
commit 4c1e887c06
8 changed files with 9 additions and 38 deletions

View File

@ -14,7 +14,6 @@ namespace FurnitureFactoryBusinessLogic.OfficePackage.Implements
{ {
CreatePdf(info); CreatePdf(info);
CreateParagraph(new PdfParagraph { Text = info.Title, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center }); CreateParagraph(new PdfParagraph { Text = info.Title, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center });
CreateParagraph(new PdfParagraph { Text = $"с {info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Center });
CreateTable(new List<string> { "2cm", "3cm", "6cm", "3cm", "3cm", "6cm", "6cm" }); CreateTable(new List<string> { "2cm", "3cm", "6cm", "3cm", "3cm", "6cm", "6cm" });

View File

@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FurnitureFactoryBusinessLogic.OfficePackage.HelperEnums;
namespace FurnitureFactoryBusinessLogic.OfficePackage.HelperEnums
{
internal class PdfRowParameters
{
public List<string> Texts { get; set; } = new();
public string Style { get; set; } = string.Empty;
public PdfParagraphAlignmentType ParagraphAlignment { get; set; }
}
}

View File

@ -1,13 +1,5 @@
using System; using FurnitureContracts.ViewModel;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FurnitureContracts.ViewModel;
using FurnitureFactoryDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace FurnitureFactoryBusinessLogic.OfficePackage.HelperModels namespace FurnitureFactoryBusinessLogic.OfficePackage.HelperModels
{ {

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace FurnitureFactoryBusinessLogic.OfficePackage.HelperEnums namespace FurnitureFactoryBusinessLogic.OfficePackage.HelperEnums
{ {
public class ExcelMergeParameters public enum ExcelMergeParameters
{ {
public string CellFromName { get; set; } = string.Empty; public string CellFromName { get; set; } = string.Empty;

View File

@ -1,16 +1,16 @@
using FurnitureFactoryBusinessLogic.OfficePackage.HelperEnums; using FurnitureFactoryBusinessLogic.OfficePackage.HelperEnums;
using FurnitureFactoryBusinessLogic.OfficePackage.HelperModels; using FurnitureFactoryBusinessLogic.OfficePackage.HelperModels;
using static System.Net.Mime.MediaTypeNames;
using DocumentFormat.OpenXml; using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Office2010.Excel; using DocumentFormat.OpenXml.Office2010.Excel;
using DocumentFormat.OpenXml.Office2013.Excel; using DocumentFormat.OpenXml.Office2013.Excel;
using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet; using DocumentFormat.OpenXml.Spreadsheet;
using MediaTypeNames = System.Net.Mime.MediaTypeNames;
namespace FurnitureFactoryBusinessLogic.OfficePackage.Implements namespace FurnitureFactoryBusinessLogic.OfficePackage.Implements
{ {
public class SaveToExcelManager public class SaveToExcelManager : AbstractSaveToExcelManager
{ {
private SpreadsheetDocument? _spreadsheetDocument; private SpreadsheetDocument? _spreadsheetDocument;
@ -161,7 +161,6 @@ namespace FurnitureFactoryBusinessLogic.OfficePackage.Implements
CreateStyles(workbookpart); CreateStyles(workbookpart);
_shareStringPart = _spreadsheetDocument.WorkbookPart!.GetPartsOfType<SharedStringTablePart>().Any() _shareStringPart = _spreadsheetDocument.WorkbookPart!.GetPartsOfType<SharedStringTablePart>().Any()
? _spreadsheetDocument.WorkbookPart.GetPartsOfType<SharedStringTablePart>().First() ? _spreadsheetDocument.WorkbookPart.GetPartsOfType<SharedStringTablePart>().First()
: _spreadsheetDocument.WorkbookPart.AddNewPart<SharedStringTablePart>(); : _spreadsheetDocument.WorkbookPart.AddNewPart<SharedStringTablePart>();

View File

@ -9,14 +9,13 @@ using System.Threading.Tasks;
using FurnitureFactoryBusinessLogic.OfficePackage.HelperModels; using FurnitureFactoryBusinessLogic.OfficePackage.HelperModels;
using static System.Net.Mime.MediaTypeNames; using static System.Net.Mime.MediaTypeNames;
using DocumentFormat.OpenXml; using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Office2010.Excel;
using DocumentFormat.OpenXml.Office2013.Excel;
using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet; using MigraDoc.DocumentObjectModel.Tables;
namespace FurnitureFactoryBusinessLogic.OfficePackage.Implements namespace FurnitureFactoryBusinessLogic.OfficePackage.Implements
{ {
public class SaveToPdfManager public class SaveToPdfManager : AbstractSaveToPdfManager
{ {
private Document? _document; private Document? _document;

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace FurnitureFactoryBusinessLogic.OfficePackage.Implements namespace FurnitureFactoryBusinessLogic.OfficePackage.Implements
{ {
public class SaveToWordManager public class SaveToWordManager : AbstractSaveToWordManager
{ {
private WordprocessingDocument? _wordDocument; private WordprocessingDocument? _wordDocument;