diff --git a/FishFactory/FishFactory/FishFactoryView.csproj b/FishFactory/FishFactory/FishFactoryView.csproj
index 3125cd1..0566024 100644
--- a/FishFactory/FishFactory/FishFactoryView.csproj
+++ b/FishFactory/FishFactory/FishFactoryView.csproj
@@ -12,6 +12,7 @@
+
diff --git a/FishFactory/FishFactory/FormCanneds.Designer.cs b/FishFactory/FishFactory/FormCanneds.Designer.cs
index 3781656..0795a64 100644
--- a/FishFactory/FishFactory/FormCanneds.Designer.cs
+++ b/FishFactory/FishFactory/FormCanneds.Designer.cs
@@ -39,18 +39,20 @@
// dataGridView
//
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- this.dataGridView.Location = new System.Drawing.Point(12, 12);
+ this.dataGridView.Location = new System.Drawing.Point(10, 9);
+ this.dataGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.dataGridView.Name = "dataGridView";
this.dataGridView.RowHeadersWidth = 51;
this.dataGridView.RowTemplate.Height = 29;
- this.dataGridView.Size = new System.Drawing.Size(572, 384);
+ this.dataGridView.Size = new System.Drawing.Size(500, 288);
this.dataGridView.TabIndex = 0;
//
// ButtonAdd
//
- this.ButtonAdd.Location = new System.Drawing.Point(590, 12);
+ this.ButtonAdd.Location = new System.Drawing.Point(516, 9);
+ this.ButtonAdd.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ButtonAdd.Name = "ButtonAdd";
- this.ButtonAdd.Size = new System.Drawing.Size(137, 29);
+ this.ButtonAdd.Size = new System.Drawing.Size(120, 22);
this.ButtonAdd.TabIndex = 1;
this.ButtonAdd.Text = "Добавить";
this.ButtonAdd.UseVisualStyleBackColor = true;
@@ -58,9 +60,10 @@
//
// ButtonChange
//
- this.ButtonChange.Location = new System.Drawing.Point(590, 47);
+ this.ButtonChange.Location = new System.Drawing.Point(516, 35);
+ this.ButtonChange.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ButtonChange.Name = "ButtonChange";
- this.ButtonChange.Size = new System.Drawing.Size(137, 29);
+ this.ButtonChange.Size = new System.Drawing.Size(120, 22);
this.ButtonChange.TabIndex = 2;
this.ButtonChange.Text = "Изменить";
this.ButtonChange.UseVisualStyleBackColor = true;
@@ -68,9 +71,10 @@
//
// ButtonRemove
//
- this.ButtonRemove.Location = new System.Drawing.Point(590, 82);
+ this.ButtonRemove.Location = new System.Drawing.Point(516, 62);
+ this.ButtonRemove.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ButtonRemove.Name = "ButtonRemove";
- this.ButtonRemove.Size = new System.Drawing.Size(137, 29);
+ this.ButtonRemove.Size = new System.Drawing.Size(120, 22);
this.ButtonRemove.TabIndex = 3;
this.ButtonRemove.Text = "Удалить";
this.ButtonRemove.UseVisualStyleBackColor = true;
@@ -78,9 +82,10 @@
//
// ButtonUpdate
//
- this.ButtonUpdate.Location = new System.Drawing.Point(590, 117);
+ this.ButtonUpdate.Location = new System.Drawing.Point(516, 88);
+ this.ButtonUpdate.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ButtonUpdate.Name = "ButtonUpdate";
- this.ButtonUpdate.Size = new System.Drawing.Size(137, 29);
+ this.ButtonUpdate.Size = new System.Drawing.Size(120, 22);
this.ButtonUpdate.TabIndex = 4;
this.ButtonUpdate.Text = "Обновить";
this.ButtonUpdate.UseVisualStyleBackColor = true;
@@ -88,16 +93,18 @@
//
// FormCanneds
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(740, 405);
+ this.ClientSize = new System.Drawing.Size(648, 304);
this.Controls.Add(this.ButtonUpdate);
this.Controls.Add(this.ButtonRemove);
this.Controls.Add(this.ButtonChange);
this.Controls.Add(this.ButtonAdd);
this.Controls.Add(this.dataGridView);
+ this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "FormCanneds";
this.Text = "Консервы";
+ this.Load += new System.EventHandler(this.FormCanneds_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.ResumeLayout(false);
diff --git a/FishFactory/FishFactory/FormComponents.Designer.cs b/FishFactory/FishFactory/FormComponents.Designer.cs
index 4223869..fa99832 100644
--- a/FishFactory/FishFactory/FormComponents.Designer.cs
+++ b/FishFactory/FishFactory/FormComponents.Designer.cs
@@ -39,18 +39,20 @@
// dataGridView
//
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- this.dataGridView.Location = new System.Drawing.Point(12, 12);
+ this.dataGridView.Location = new System.Drawing.Point(10, 9);
+ this.dataGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.dataGridView.Name = "dataGridView";
this.dataGridView.RowHeadersWidth = 51;
this.dataGridView.RowTemplate.Height = 29;
- this.dataGridView.Size = new System.Drawing.Size(572, 384);
+ this.dataGridView.Size = new System.Drawing.Size(500, 288);
this.dataGridView.TabIndex = 0;
//
// ButtonAdd
//
- this.ButtonAdd.Location = new System.Drawing.Point(590, 12);
+ this.ButtonAdd.Location = new System.Drawing.Point(516, 9);
+ this.ButtonAdd.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ButtonAdd.Name = "ButtonAdd";
- this.ButtonAdd.Size = new System.Drawing.Size(137, 29);
+ this.ButtonAdd.Size = new System.Drawing.Size(120, 22);
this.ButtonAdd.TabIndex = 1;
this.ButtonAdd.Text = "Добавить";
this.ButtonAdd.UseVisualStyleBackColor = true;
@@ -58,9 +60,10 @@
//
// ButtonChange
//
- this.ButtonChange.Location = new System.Drawing.Point(590, 47);
+ this.ButtonChange.Location = new System.Drawing.Point(516, 35);
+ this.ButtonChange.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ButtonChange.Name = "ButtonChange";
- this.ButtonChange.Size = new System.Drawing.Size(137, 29);
+ this.ButtonChange.Size = new System.Drawing.Size(120, 22);
this.ButtonChange.TabIndex = 2;
this.ButtonChange.Text = "Изменить";
this.ButtonChange.UseVisualStyleBackColor = true;
@@ -68,9 +71,10 @@
//
// ButtonRemove
//
- this.ButtonRemove.Location = new System.Drawing.Point(590, 82);
+ this.ButtonRemove.Location = new System.Drawing.Point(516, 62);
+ this.ButtonRemove.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ButtonRemove.Name = "ButtonRemove";
- this.ButtonRemove.Size = new System.Drawing.Size(137, 29);
+ this.ButtonRemove.Size = new System.Drawing.Size(120, 22);
this.ButtonRemove.TabIndex = 3;
this.ButtonRemove.Text = "Удалить";
this.ButtonRemove.UseVisualStyleBackColor = true;
@@ -78,9 +82,10 @@
//
// ButtonUpdate
//
- this.ButtonUpdate.Location = new System.Drawing.Point(590, 117);
+ this.ButtonUpdate.Location = new System.Drawing.Point(516, 88);
+ this.ButtonUpdate.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ButtonUpdate.Name = "ButtonUpdate";
- this.ButtonUpdate.Size = new System.Drawing.Size(137, 29);
+ this.ButtonUpdate.Size = new System.Drawing.Size(120, 22);
this.ButtonUpdate.TabIndex = 4;
this.ButtonUpdate.Text = "Обновить";
this.ButtonUpdate.UseVisualStyleBackColor = true;
@@ -88,16 +93,18 @@
//
// FormComponents
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(740, 405);
+ this.ClientSize = new System.Drawing.Size(648, 304);
this.Controls.Add(this.ButtonUpdate);
this.Controls.Add(this.ButtonRemove);
this.Controls.Add(this.ButtonChange);
this.Controls.Add(this.ButtonAdd);
this.Controls.Add(this.dataGridView);
+ this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "FormComponents";
this.Text = "Компоненты";
+ this.Load += new System.EventHandler(this.FormComponents_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.ResumeLayout(false);
diff --git a/FishFactory/FishFactory/FormMain.Designer.cs b/FishFactory/FishFactory/FormMain.Designer.cs
index 36372f2..dd2824c 100644
--- a/FishFactory/FishFactory/FormMain.Designer.cs
+++ b/FishFactory/FishFactory/FormMain.Designer.cs
@@ -38,6 +38,10 @@
this.компонентыToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.консервыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
+ this.отчетыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.списокКомпонентовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.компонентыПоИзделиямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
@@ -129,7 +133,8 @@
//
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.изделияToolStripMenuItem});
+ this.изделияToolStripMenuItem,
+ this.отчетыToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2);
@@ -137,6 +142,37 @@
this.menuStrip1.TabIndex = 6;
this.menuStrip1.Text = "menuStrip1";
//
+ // отчетыToolStripMenuItem
+ //
+ this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.списокКомпонентовToolStripMenuItem,
+ this.компонентыПоИзделиямToolStripMenuItem,
+ this.списокЗаказовToolStripMenuItem});
+ this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
+ this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(60, 20);
+ this.отчетыToolStripMenuItem.Text = "Отчеты";
+ //
+ // списокКомпонентовToolStripMenuItem
+ //
+ this.списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem";
+ this.списокКомпонентовToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
+ this.списокКомпонентовToolStripMenuItem.Text = "Список компонентов";
+ this.списокКомпонентовToolStripMenuItem.Click += new System.EventHandler(this.списокКомпонентовToolStripMenuItem_Click_1);
+ //
+ // компонентыПоИзделиямToolStripMenuItem
+ //
+ this.компонентыПоИзделиямToolStripMenuItem.Name = "компонентыПоИзделиямToolStripMenuItem";
+ this.компонентыПоИзделиямToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
+ this.компонентыПоИзделиямToolStripMenuItem.Text = "Компоненты по изделиям";
+ this.компонентыПоИзделиямToolStripMenuItem.Click += new System.EventHandler(this.компонентыПоИзделиямToolStripMenuItem_Click_1);
+ //
+ // списокЗаказовToolStripMenuItem
+ //
+ this.списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
+ this.списокЗаказовToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
+ this.списокЗаказовToolStripMenuItem.Text = "Список заказов";
+ this.списокЗаказовToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказовToolStripMenuItem_Click_1);
+ //
// FormMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
@@ -152,6 +188,7 @@
this.MainMenuStrip = this.menuStrip1;
this.Name = "FormMain";
this.Text = "Рыбный завод";
+ this.Load += new System.EventHandler(this.FormMain_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
@@ -171,5 +208,9 @@
private ToolStripMenuItem компонентыToolStripMenuItem1;
private ToolStripMenuItem консервыToolStripMenuItem;
private MenuStrip menuStrip1;
+ private ToolStripMenuItem отчетыToolStripMenuItem;
+ private ToolStripMenuItem списокКомпонентовToolStripMenuItem;
+ private ToolStripMenuItem компонентыПоИзделиямToolStripMenuItem;
+ private ToolStripMenuItem списокЗаказовToolStripMenuItem;
}
}
\ No newline at end of file
diff --git a/FishFactory/FishFactory/FormMain.cs b/FishFactory/FishFactory/FormMain.cs
index e310451..c31eda2 100644
--- a/FishFactory/FishFactory/FormMain.cs
+++ b/FishFactory/FishFactory/FormMain.cs
@@ -1,4 +1,5 @@
-using FishFactoryContracts.BindingModels;
+using FishFactoryBusinessLogic.BusinessLogic;
+using FishFactoryContracts.BindingModels;
using FishFactoryContracts.BusinessLogicsContracts;
using FishFactoryDataModels.Enums;
using FishFactoryListImplement.Models;
@@ -21,11 +22,13 @@ namespace FishFactoryView
{
private readonly ILogger _logger;
private readonly IOrderLogic _orderLogic;
- public FormMain(ILogger logger, IOrderLogic orderLogic)
+ private readonly IReportLogic _reportLogic;
+ public FormMain(ILogger logger, IOrderLogic orderLogic, IReportLogic reportLogic)
{
InitializeComponent();
_logger = logger;
_orderLogic = orderLogic;
+ _reportLogic = reportLogic;
}
private void FormMain_Load(object sender, EventArgs e)
{
@@ -176,5 +179,36 @@ namespace FishFactoryView
{
LoadData();
}
+
+ private void списокКомпонентовToolStripMenuItem_Click_1(object sender, EventArgs e)
+ {
+ using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ _reportLogic.SaveComponentsToWordFile(new ReportBindingModel
+ {
+ FileName = dialog.FileName
+ });
+ MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+ }
+
+ private void компонентыПоИзделиямToolStripMenuItem_Click_1(object sender, EventArgs e)
+ {
+ var service = Program.ServiceProvider?.GetService(typeof(FormReportCannedComponents));
+ if (service is FormReportCannedComponents form)
+ {
+ form.ShowDialog();
+ }
+ }
+
+ private void списокЗаказовToolStripMenuItem_Click_1(object sender, EventArgs e)
+ {
+ var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders));
+ if (service is FormReportOrders form)
+ {
+ form.ShowDialog();
+ }
+ }
}
}
diff --git a/FishFactory/FishFactory/FormReportCannedComponents.Designer.cs b/FishFactory/FishFactory/FormReportCannedComponents.Designer.cs
new file mode 100644
index 0000000..f7ce8c3
--- /dev/null
+++ b/FishFactory/FishFactory/FormReportCannedComponents.Designer.cs
@@ -0,0 +1,122 @@
+namespace FishFactoryView
+{
+ partial class FormReportCannedComponents
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.dataGridView = new System.Windows.Forms.DataGridView();
+ this.ColumnCanneds = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.ColumnComponent = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.ColumnCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.buttonSaveToExcel = new System.Windows.Forms.Button();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
+ this.SuspendLayout();
+ //
+ // dataGridView
+ //
+ this.dataGridView.AllowUserToAddRows = false;
+ this.dataGridView.AllowUserToDeleteRows = false;
+ this.dataGridView.AllowUserToOrderColumns = true;
+ this.dataGridView.AllowUserToResizeColumns = false;
+ this.dataGridView.AllowUserToResizeRows = false;
+ this.dataGridView.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
+ this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.ColumnCanneds,
+ this.ColumnComponent,
+ this.ColumnCount});
+ this.dataGridView.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.dataGridView.Location = new System.Drawing.Point(0, 63);
+ this.dataGridView.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
+ this.dataGridView.MultiSelect = false;
+ this.dataGridView.Name = "dataGridView";
+ this.dataGridView.ReadOnly = true;
+ this.dataGridView.RowHeadersVisible = false;
+ this.dataGridView.RowHeadersWidth = 51;
+ this.dataGridView.Size = new System.Drawing.Size(704, 680);
+ this.dataGridView.TabIndex = 0;
+ //
+ // ColumnCanneds
+ //
+ this.ColumnCanneds.HeaderText = "Консервы";
+ this.ColumnCanneds.MinimumWidth = 6;
+ this.ColumnCanneds.Name = "ColumnCanneds";
+ this.ColumnCanneds.ReadOnly = true;
+ this.ColumnCanneds.Width = 200;
+ //
+ // ColumnComponent
+ //
+ this.ColumnComponent.HeaderText = "Компоненты";
+ this.ColumnComponent.MinimumWidth = 6;
+ this.ColumnComponent.Name = "ColumnComponent";
+ this.ColumnComponent.ReadOnly = true;
+ this.ColumnComponent.Width = 200;
+ //
+ // ColumnCount
+ //
+ this.ColumnCount.HeaderText = "Количество";
+ this.ColumnCount.MinimumWidth = 6;
+ this.ColumnCount.Name = "ColumnCount";
+ this.ColumnCount.ReadOnly = true;
+ this.ColumnCount.Width = 125;
+ //
+ // buttonSaveToExcel
+ //
+ this.buttonSaveToExcel.Location = new System.Drawing.Point(14, 13);
+ this.buttonSaveToExcel.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
+ this.buttonSaveToExcel.Name = "buttonSaveToExcel";
+ this.buttonSaveToExcel.Size = new System.Drawing.Size(213, 36);
+ this.buttonSaveToExcel.TabIndex = 1;
+ this.buttonSaveToExcel.Text = "Сохранить в Excel";
+ this.buttonSaveToExcel.UseVisualStyleBackColor = true;
+ this.buttonSaveToExcel.Click += new System.EventHandler(this.ButtonSaveToExcel_Click);
+ //
+ // FormReportCannedComponents
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(704, 743);
+ this.Controls.Add(this.buttonSaveToExcel);
+ this.Controls.Add(this.dataGridView);
+ this.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
+ this.Name = "FormReportCannedComponents";
+ this.Text = "Компоненты по консервам";
+ this.Load += new System.EventHandler(this.FormReportCannedComponents_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.DataGridView dataGridView;
+ private System.Windows.Forms.Button buttonSaveToExcel;
+ private DataGridViewTextBoxColumn ColumnCanneds;
+ private DataGridViewTextBoxColumn ColumnComponent;
+ private DataGridViewTextBoxColumn ColumnCount;
+ }
+}
\ No newline at end of file
diff --git a/FishFactory/FishFactory/FormReportCannedComponents.cs b/FishFactory/FishFactory/FormReportCannedComponents.cs
new file mode 100644
index 0000000..d6973af
--- /dev/null
+++ b/FishFactory/FishFactory/FormReportCannedComponents.cs
@@ -0,0 +1,90 @@
+using FishFactoryContracts.BindingModels;
+using FishFactoryContracts.BusinessLogicsContracts;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace FishFactoryView
+{
+ public partial class FormReportCannedComponents : Form
+ {
+ private readonly ILogger _logger;
+ private readonly IReportLogic _logic;
+ public FormReportCannedComponents(ILogger
+ logger, IReportLogic logic)
+ {
+ InitializeComponent();
+ _logger = logger;
+ _logic = logic;
+ }
+ private void FormReportCannedComponents_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ var dict = _logic.GetCannedComponent();
+ if (dict != null)
+ {
+ dataGridView.Rows.Clear();
+ foreach (var elem in dict)
+ {
+ dataGridView.Rows.Add(new object[] { elem.CannedName,
+"", "" });
+ foreach (var listElem in elem.Components)
+ {
+ dataGridView.Rows.Add(new object[] { "",
+listElem.Item1, listElem.Item2 });
+ }
+ dataGridView.Rows.Add(new object[] { "Итого", "",
+elem.TotalCount });
+ dataGridView.Rows.Add(Array.Empty