Правки
This commit is contained in:
parent
208ca6b9a2
commit
6d603ebb14
@ -31,19 +31,19 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage
|
|||||||
|
|
||||||
uint rowIndex = 2;
|
uint rowIndex = 2;
|
||||||
|
|
||||||
foreach (var mwp in info.FurnitureWorkPieces)
|
foreach (var fwp in info.FurnitureWorkPieces)
|
||||||
{
|
{
|
||||||
InsertCellInWorksheet(new ExcelCellParameters
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
{
|
{
|
||||||
ColumnName = "A",
|
ColumnName = "A",
|
||||||
RowIndex = rowIndex,
|
RowIndex = rowIndex,
|
||||||
Text = mwp.FurnitureName,
|
Text = fwp.FurnitureName,
|
||||||
StyleInfo = ExcelStyleInfoType.Text
|
StyleInfo = ExcelStyleInfoType.Text
|
||||||
});
|
});
|
||||||
|
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
|
|
||||||
foreach (var (WorkPiece, Count) in mwp.WorkPieces)
|
foreach (var (WorkPiece, Count) in fwp.WorkPieces)
|
||||||
{
|
{
|
||||||
InsertCellInWorksheet(new ExcelCellParameters
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
{
|
{
|
||||||
@ -76,7 +76,7 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage
|
|||||||
{
|
{
|
||||||
ColumnName = "C",
|
ColumnName = "C",
|
||||||
RowIndex = rowIndex,
|
RowIndex = rowIndex,
|
||||||
Text = mwp.TotalCount.ToString(),
|
Text = fwp.TotalCount.ToString(),
|
||||||
StyleInfo = ExcelStyleInfoType.Text
|
StyleInfo = ExcelStyleInfoType.Text
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage.HelperModels
|
|||||||
// Модель параграфов, которые есть в тексте
|
// Модель параграфов, которые есть в тексте
|
||||||
public class WordParagraph
|
public class WordParagraph
|
||||||
{
|
{
|
||||||
//набор текстов в абзаце (для случая, если в абзаце текст разных стилей)
|
// Набор текстов в абзаце (для случая, если в абзаце текст разных стилей)
|
||||||
public List<(string, WordTextProperties)> Texts { get; set; } = new();
|
public List<(string, WordTextProperties)> Texts { get; set; } = new();
|
||||||
|
|
||||||
//свойства параграфа, если они есть
|
// Свойства параграфа, если они есть
|
||||||
public WordTextProperties? TextProperties { get; set; }
|
public WordTextProperties? TextProperties { get; set; }
|
||||||
|
|
||||||
public List<List<(string, WordTextProperties)>> RowTexts { get; set; } = new();
|
public List<List<(string, WordTextProperties)>> RowTexts { get; set; } = new();
|
||||||
|
@ -310,7 +310,7 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Все ячейки должны быть последовательно друг за другом расположены
|
// Все ячейки должны быть последовательно друг за другом расположены
|
||||||
// нужно определить, после какой вставлять
|
// Нужно определить, после какой вставлять
|
||||||
Cell? refCell = null;
|
Cell? refCell = null;
|
||||||
|
|
||||||
foreach (Cell rowCell in row.Elements<Cell>())
|
foreach (Cell rowCell in row.Elements<Cell>())
|
||||||
|
@ -114,6 +114,7 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements
|
|||||||
var docRun = new Run();
|
var docRun = new Run();
|
||||||
var properties = new RunProperties();
|
var properties = new RunProperties();
|
||||||
|
|
||||||
|
// Задание свойств текста - размер и жирность
|
||||||
properties.AppendChild(new FontSize { Val = run.Item2.Size });
|
properties.AppendChild(new FontSize { Val = run.Item2.Size });
|
||||||
|
|
||||||
if (run.Item2.Bold)
|
if (run.Item2.Bold)
|
||||||
|
Loading…
Reference in New Issue
Block a user