diff --git a/VisualComponentsForm/VisualComponentsForm/FormWord.cs b/VisualComponentsForm/VisualComponentsForm/FormWord.cs index 993fba3..d962658 100644 --- a/VisualComponentsForm/VisualComponentsForm/FormWord.cs +++ b/VisualComponentsForm/VisualComponentsForm/FormWord.cs @@ -1,4 +1,5 @@ -using System; +using DocumentFormat.OpenXml.Spreadsheet; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -40,7 +41,7 @@ namespace VisualComponentsForm Car secondCar = new("Opel", "Astra", 1320000, 2017); Car thirdCar = new("Lada", "Granta", 430000, 2009); Car fourthCar = new("Lada", "Vesta", 1220000, 2022); - Car fifthCar = new("Opel", "Astra", 2100000, 2018); + Car fifthCar = new("Opel", "Vectra", 2100000, 2018); Car sixthCar = new("Mercedes", "E-class", 3200500, 2019); Dictionary colData; @@ -57,9 +58,9 @@ namespace VisualComponentsForm colData = new Dictionary() { { 0, new ColumnName("Марка автомобиля", "Brand") }, - { 1, new ColumnName("Год выпуска", "YearProduction") }, - { 2, new ColumnName("Цена", "Price") }, - { 3, new ColumnName("Модель", "Model") }, + { 1, new ColumnName("Модель", "Model") }, + { 2, new ColumnName("Год выпуска", "YearProduction") }, + { 3, new ColumnName("Цена", "Price") }, }; } @@ -101,7 +102,7 @@ namespace VisualComponentsForm try { setDataTable = new(dialog.FileName, "Второе задание", new List { 48, 24 }, - new List { 2000, 2000, 1500, 1500 }, listCars, colData); + new List { 2000, 2000, 1500, 1500 }, listCars.GroupBy(x => x.Brand).SelectMany(r => r).ToList(), colData); componentBigTable.CreateDoc(setDataTable);