From fc113983ea43c0817a473459cfda18c2ea322782 Mon Sep 17 00:00:00 2001 From: GokaPek Date: Mon, 30 Sep 2024 00:41:41 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B8=D0=BB?= =?UTF-8?q?=D0=BE=D1=81=D1=8C!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExexForm2/Form1.cs | 2 +- Library14Petrushin/PdfColGroupTable.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ExexForm2/Form1.cs b/ExexForm2/Form1.cs index 6f57a66..1cc6726 100644 --- a/ExexForm2/Form1.cs +++ b/ExexForm2/Form1.cs @@ -91,7 +91,7 @@ namespace ExexForm2 var rowHeights = new List { 20, 20 }; var mergeCells = new List<(int startRow, int endRow, int startColumn, int endColumn)> { - (0, 0, 0, 1) // Объединение первых двух столбцов в первой строке + //(0, 0, 0, 1) // Объединение первых двух столбцов в первой строке }; generator.GeneratePdf(fileName, "Example Document", mergeCells, rowHeights, headers, propertyNames, data1); diff --git a/Library14Petrushin/PdfColGroupTable.cs b/Library14Petrushin/PdfColGroupTable.cs index 5e42452..4774d2e 100644 --- a/Library14Petrushin/PdfColGroupTable.cs +++ b/Library14Petrushin/PdfColGroupTable.cs @@ -67,12 +67,12 @@ namespace Library14Petrushin x += columnWidth; // Отрисовка данных - for (int row = 0; row < data.Count; row++) + for (int col = 0; col < data.Count; col++) { - var item = data[row]; - for (int col = 0; col < propertyNames.Count; col++) + for (int row = 0; row < propertyNames.Count; row++) { - var property = item.GetType().GetProperty(propertyNames[col]); + var item = data[col]; + var property = item.GetType().GetProperty(propertyNames[row]); if (property != null) { var value = property.GetValue(item)?.ToString() ?? string.Empty;