Поправил экспорт отчета в ворд под новую версию библиотеки

This commit is contained in:
Никита Потапов 2024-12-06 20:15:06 +04:00
parent 08a481d8e6
commit c7254999b0
2 changed files with 7 additions and 5 deletions

View File

@ -15,7 +15,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="UserComponentsOption19" Version="1.0.0" /> <PackageReference Include="UserComponentsOption19" Version="1.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -235,7 +235,12 @@ namespace InternetShopForms
"Òîâàðû", "Òîâàðû",
}; };
List<float> columnWidths = [3.0f, 3.0f, 3.0f, 3.0f]; List<(float columnWidth, string headerRowCell1, string headerRowCell2, string property)> columnWidths =
[ (3.0f, "ID", "ID", "Id"),
(5.0f, "Ëè÷íûå äàííûå", "ÔÈÎ", "CustomerFIO"),
(5.0f, "Ëè÷íûå äàííûå", "Email", "CustomerEmail"),
(5.0f, "Òîâàðû", "Òîâàðû", "ProductsString"),
];
var mergeColumns = new List<(int StartColumn, int EndColumn)> { (1, 2) }; var mergeColumns = new List<(int StartColumn, int EndColumn)> { (1, 2) };
@ -252,9 +257,6 @@ namespace InternetShopForms
"Îò÷åò ïî çàêàçàì", "Îò÷åò ïî çàêàçàì",
mergeColumns, mergeColumns,
columnWidths, columnWidths,
headerRow1,
headerRow2,
columnPropertyMapping,
orders orders
); );
MessageBox.Show("Îò÷åò óñïåøíî ñôîðìèðîâàí", "Ñîçäàíèå îò÷åòà", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("Îò÷åò óñïåøíî ñôîðìèðîâàí", "Ñîçäàíèå îò÷åòà", MessageBoxButtons.OK, MessageBoxIcon.Information);