diff --git a/FishFactory/FishFactory.csproj b/FishFactory/FishFactory.csproj
index d544413..41f596a 100644
--- a/FishFactory/FishFactory.csproj
+++ b/FishFactory/FishFactory.csproj
@@ -14,8 +14,8 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
@@ -41,4 +41,10 @@
+
+
+ Always
+
+
+
\ No newline at end of file
diff --git a/FishFactory/Forms/FormMain.Designer.cs b/FishFactory/Forms/FormMain.Designer.cs
index 4b7e0e5..85453da 100644
--- a/FishFactory/Forms/FormMain.Designer.cs
+++ b/FishFactory/Forms/FormMain.Designer.cs
@@ -33,16 +33,16 @@
toolStripDropDownButton1 = new ToolStripDropDownButton();
компонентыToolStripMenuItem = new ToolStripMenuItem();
консервыToolStripMenuItem = new ToolStripMenuItem();
+ toolStripDropDownButton2 = new ToolStripDropDownButton();
+ списокКомпонентовToolStripMenuItem = new ToolStripMenuItem();
+ компонентыПоКонсервамToolStripMenuItem = new ToolStripMenuItem();
+ списокЗаказовToolStripMenuItem = new ToolStripMenuItem();
buttonCreateOrder = new Button();
buttonTakeOrderInWork = new Button();
buttonOrderReady = new Button();
buttonIssuedOrder = new Button();
buttonRef = new Button();
dataGridView = new DataGridView();
- toolStripDropDownButton2 = new ToolStripDropDownButton();
- списокКомпонентовToolStripMenuItem = new ToolStripMenuItem();
- компонентыПоИзделиямToolStripMenuItem = new ToolStripMenuItem();
- списокЗаказовToolStripMenuItem = new ToolStripMenuItem();
toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
@@ -53,7 +53,7 @@
toolStrip1.Items.AddRange(new ToolStripItem[] { toolStripDropDownButton1, toolStripDropDownButton2 });
toolStrip1.Location = new Point(0, 0);
toolStrip1.Name = "toolStrip1";
- toolStrip1.Size = new Size(969, 25);
+ toolStrip1.Size = new Size(1107, 27);
toolStrip1.TabIndex = 0;
toolStrip1.Text = "toolStrip1";
//
@@ -64,28 +64,61 @@
toolStripDropDownButton1.Image = (Image)resources.GetObject("toolStripDropDownButton1.Image");
toolStripDropDownButton1.ImageTransparentColor = Color.Magenta;
toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- toolStripDropDownButton1.Size = new Size(88, 22);
+ toolStripDropDownButton1.Size = new Size(108, 24);
toolStripDropDownButton1.Text = "Справочник";
//
// компонентыToolStripMenuItem
//
компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
- компонентыToolStripMenuItem.Size = new Size(145, 22);
+ компонентыToolStripMenuItem.Size = new Size(182, 26);
компонентыToolStripMenuItem.Text = "Компоненты";
компонентыToolStripMenuItem.Click += компонентыToolStripMenuItem_Click;
//
// консервыToolStripMenuItem
//
консервыToolStripMenuItem.Name = "консервыToolStripMenuItem";
- консервыToolStripMenuItem.Size = new Size(145, 22);
+ консервыToolStripMenuItem.Size = new Size(182, 26);
консервыToolStripMenuItem.Text = "Консервы";
консервыToolStripMenuItem.Click += консервыToolStripMenuItem_Click;
//
+ // toolStripDropDownButton2
+ //
+ toolStripDropDownButton2.DisplayStyle = ToolStripItemDisplayStyle.Text;
+ toolStripDropDownButton2.DropDownItems.AddRange(new ToolStripItem[] { списокКомпонентовToolStripMenuItem, компонентыПоКонсервамToolStripMenuItem, списокЗаказовToolStripMenuItem });
+ toolStripDropDownButton2.Image = (Image)resources.GetObject("toolStripDropDownButton2.Image");
+ toolStripDropDownButton2.ImageTransparentColor = Color.Magenta;
+ toolStripDropDownButton2.Name = "toolStripDropDownButton2";
+ toolStripDropDownButton2.Size = new Size(73, 24);
+ toolStripDropDownButton2.Text = "Отчёты";
+ //
+ // списокКомпонентовToolStripMenuItem
+ //
+ списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem";
+ списокКомпонентовToolStripMenuItem.Size = new Size(284, 26);
+ списокКомпонентовToolStripMenuItem.Text = "Список компонентов";
+ списокКомпонентовToolStripMenuItem.Click += списокКомпонентовToolStripMenuItem_Click;
+ //
+ // компонентыПоКонсервамToolStripMenuItem
+ //
+ компонентыПоКонсервамToolStripMenuItem.Name = "компонентыПоКонсервамToolStripMenuItem";
+ компонентыПоКонсервамToolStripMenuItem.Size = new Size(284, 26);
+ компонентыПоКонсервамToolStripMenuItem.Text = "Компоненты по консервам";
+ компонентыПоКонсервамToolStripMenuItem.Click += компонентыПоИзделиямToolStripMenuItem_Click;
+ //
+ // списокЗаказовToolStripMenuItem
+ //
+ списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
+ списокЗаказовToolStripMenuItem.Size = new Size(284, 26);
+ списокЗаказовToolStripMenuItem.Text = "Список заказов";
+ списокЗаказовToolStripMenuItem.Click += списокЗаказовToolStripMenuItem_Click;
+ //
// buttonCreateOrder
//
- buttonCreateOrder.Location = new Point(800, 56);
+ buttonCreateOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right;
+ buttonCreateOrder.Location = new Point(914, 75);
+ buttonCreateOrder.Margin = new Padding(3, 4, 3, 4);
buttonCreateOrder.Name = "buttonCreateOrder";
- buttonCreateOrder.Size = new Size(141, 24);
+ buttonCreateOrder.Size = new Size(161, 32);
buttonCreateOrder.TabIndex = 1;
buttonCreateOrder.Text = "Создать заказ";
buttonCreateOrder.UseVisualStyleBackColor = true;
@@ -93,9 +126,11 @@
//
// buttonTakeOrderInWork
//
- buttonTakeOrderInWork.Location = new Point(800, 100);
+ buttonTakeOrderInWork.Anchor = AnchorStyles.Top | AnchorStyles.Right;
+ buttonTakeOrderInWork.Location = new Point(914, 133);
+ buttonTakeOrderInWork.Margin = new Padding(3, 4, 3, 4);
buttonTakeOrderInWork.Name = "buttonTakeOrderInWork";
- buttonTakeOrderInWork.Size = new Size(141, 24);
+ buttonTakeOrderInWork.Size = new Size(161, 32);
buttonTakeOrderInWork.TabIndex = 2;
buttonTakeOrderInWork.Text = "Отдать на выполнение";
buttonTakeOrderInWork.UseVisualStyleBackColor = true;
@@ -103,9 +138,11 @@
//
// buttonOrderReady
//
- buttonOrderReady.Location = new Point(800, 142);
+ buttonOrderReady.Anchor = AnchorStyles.Top | AnchorStyles.Right;
+ buttonOrderReady.Location = new Point(914, 189);
+ buttonOrderReady.Margin = new Padding(3, 4, 3, 4);
buttonOrderReady.Name = "buttonOrderReady";
- buttonOrderReady.Size = new Size(141, 24);
+ buttonOrderReady.Size = new Size(161, 32);
buttonOrderReady.TabIndex = 3;
buttonOrderReady.Text = "Заказ готов";
buttonOrderReady.UseVisualStyleBackColor = true;
@@ -113,9 +150,11 @@
//
// buttonIssuedOrder
//
- buttonIssuedOrder.Location = new Point(800, 181);
+ buttonIssuedOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right;
+ buttonIssuedOrder.Location = new Point(914, 241);
+ buttonIssuedOrder.Margin = new Padding(3, 4, 3, 4);
buttonIssuedOrder.Name = "buttonIssuedOrder";
- buttonIssuedOrder.Size = new Size(141, 24);
+ buttonIssuedOrder.Size = new Size(161, 32);
buttonIssuedOrder.TabIndex = 4;
buttonIssuedOrder.Text = "Заказ выдан";
buttonIssuedOrder.UseVisualStyleBackColor = true;
@@ -123,9 +162,11 @@
//
// buttonRef
//
- buttonRef.Location = new Point(800, 222);
+ buttonRef.Anchor = AnchorStyles.Top | AnchorStyles.Right;
+ buttonRef.Location = new Point(914, 296);
+ buttonRef.Margin = new Padding(3, 4, 3, 4);
buttonRef.Name = "buttonRef";
- buttonRef.Size = new Size(141, 24);
+ buttonRef.Size = new Size(161, 32);
buttonRef.TabIndex = 5;
buttonRef.Text = "Обновить список";
buttonRef.UseVisualStyleBackColor = true;
@@ -134,51 +175,21 @@
// dataGridView
//
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- dataGridView.Location = new Point(0, 26);
+ dataGridView.Location = new Point(0, 27);
+ dataGridView.Margin = new Padding(3, 4, 3, 4);
dataGridView.Name = "dataGridView";
dataGridView.ReadOnly = true;
dataGridView.RowHeadersWidth = 51;
dataGridView.RowTemplate.Height = 24;
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
- dataGridView.Size = new Size(763, 435);
+ dataGridView.Size = new Size(872, 588);
dataGridView.TabIndex = 6;
//
- // toolStripDropDownButton2
- //
- toolStripDropDownButton2.DisplayStyle = ToolStripItemDisplayStyle.Text;
- toolStripDropDownButton2.DropDownItems.AddRange(new ToolStripItem[] { списокКомпонентовToolStripMenuItem, компонентыПоИзделиямToolStripMenuItem, списокЗаказовToolStripMenuItem });
- toolStripDropDownButton2.Image = (Image)resources.GetObject("toolStripDropDownButton2.Image");
- toolStripDropDownButton2.ImageTransparentColor = Color.Magenta;
- toolStripDropDownButton2.Name = "toolStripDropDownButton2";
- toolStripDropDownButton2.Size = new Size(61, 22);
- toolStripDropDownButton2.Text = "Отчёты";
- //
- // списокКомпонентовToolStripMenuItem
- //
- списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem";
- списокКомпонентовToolStripMenuItem.Size = new Size(225, 22);
- списокКомпонентовToolStripMenuItem.Text = "Список компонентов";
- списокКомпонентовToolStripMenuItem.Click += списокКомпонентовToolStripMenuItem_Click;
- //
- // компонентыПоИзделиямToolStripMenuItem
- //
- компонентыПоИзделиямToolStripMenuItem.Name = "компонентыПоИзделиямToolStripMenuItem";
- компонентыПоИзделиямToolStripMenuItem.Size = new Size(225, 22);
- компонентыПоИзделиямToolStripMenuItem.Text = "Компоненты по консервам";
- компонентыПоИзделиямToolStripMenuItem.Click += компонентыПоИзделиямToolStripMenuItem_Click;
- //
- // списокЗаказовToolStripMenuItem
- //
- списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
- списокЗаказовToolStripMenuItem.Size = new Size(225, 22);
- списокЗаказовToolStripMenuItem.Text = "Список заказов";
- списокЗаказовToolStripMenuItem.Click += списокЗаказовToolStripMenuItem_Click;
- //
// FormMain
//
- AutoScaleDimensions = new SizeF(7F, 15F);
+ AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
- ClientSize = new Size(969, 461);
+ ClientSize = new Size(1107, 615);
Controls.Add(dataGridView);
Controls.Add(buttonRef);
Controls.Add(buttonIssuedOrder);
@@ -186,6 +197,7 @@
Controls.Add(buttonTakeOrderInWork);
Controls.Add(buttonCreateOrder);
Controls.Add(toolStrip1);
+ Margin = new Padding(3, 4, 3, 4);
Name = "FormMain";
Text = "Рыбный завод";
Load += FormMain_Load;
@@ -210,7 +222,7 @@
private ToolStripMenuItem консервыToolStripMenuItem;
private ToolStripDropDownButton toolStripDropDownButton2;
private ToolStripMenuItem списокКомпонентовToolStripMenuItem;
- private ToolStripMenuItem компонентыПоИзделиямToolStripMenuItem;
+ private ToolStripMenuItem компонентыПоКонсервамToolStripMenuItem;
private ToolStripMenuItem списокЗаказовToolStripMenuItem;
}
}
\ No newline at end of file
diff --git a/FishFactory/Forms/FormMain.cs b/FishFactory/Forms/FormMain.cs
index 149ea78..9104c44 100644
--- a/FishFactory/Forms/FormMain.cs
+++ b/FishFactory/Forms/FormMain.cs
@@ -10,11 +10,12 @@ namespace FishFactory.Forms
private readonly ILogger _logger;
private readonly IOrderLogic _orderLogic;
private readonly IReportLogic _reportLogic;
- public FormMain(ILogger logger, IOrderLogic orderLogic)
+ public FormMain(ILogger logger, IOrderLogic orderLogic, IReportLogic reportLogic)
{
InitializeComponent();
_logger = logger;
_orderLogic = orderLogic;
+ _reportLogic = reportLogic;
}
private void FormMain_Load(object sender, EventArgs e)
{
@@ -150,7 +151,7 @@ namespace FishFactory.Forms
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
if (dialog.ShowDialog() == DialogResult.OK)
{
- _reportLogic.SaveComponentsToWordFile(new ReportBindingModel
+ _reportLogic.SaveCannedsToWordFile(new ReportBindingModel
{
FileName = dialog.FileName
});
diff --git a/FishFactory/Forms/FormMain.resx b/FishFactory/Forms/FormMain.resx
index a50214e..cb299dc 100644
--- a/FishFactory/Forms/FormMain.resx
+++ b/FishFactory/Forms/FormMain.resx
@@ -124,7 +124,7 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAA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
+ 6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV
+ vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC
+ U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T
+ luAdmZxHBG37FFuWBC/j5XKOmX8WAH7rcI6ZMffPgjQwN2bXJgDo/COBTpjneQ2dML0PY3cISreGe8HM
+ qgAAAABJRU5ErkJggg==
diff --git a/FishFactory/Forms/FormReportCannedComponents.Designer.cs b/FishFactory/Forms/FormReportCannedComponents.Designer.cs
index 497ff67..dd6bce1 100644
--- a/FishFactory/Forms/FormReportCannedComponents.Designer.cs
+++ b/FishFactory/Forms/FormReportCannedComponents.Designer.cs
@@ -30,17 +30,18 @@
{
buttonSaveToExcel = new Button();
dataGridView = new DataGridView();
- Component = new DataGridViewTextBoxColumn();
- Canned = new DataGridViewTextBoxColumn();
Count = new DataGridViewTextBoxColumn();
+ Canned = new DataGridViewTextBoxColumn();
+ Component = new DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
//
// buttonSaveToExcel
//
- buttonSaveToExcel.Location = new Point(27, 15);
+ buttonSaveToExcel.Location = new Point(31, 19);
+ buttonSaveToExcel.Margin = new Padding(3, 4, 3, 4);
buttonSaveToExcel.Name = "buttonSaveToExcel";
- buttonSaveToExcel.Size = new Size(160, 23);
+ buttonSaveToExcel.Size = new Size(183, 29);
buttonSaveToExcel.TabIndex = 0;
buttonSaveToExcel.Text = "Сохранить в Excel";
buttonSaveToExcel.UseVisualStyleBackColor = true;
@@ -51,39 +52,45 @@
dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Columns.AddRange(new DataGridViewColumn[] { Component, Canned, Count });
- dataGridView.Location = new Point(0, 47);
+ dataGridView.Location = new Point(0, 60);
+ dataGridView.Margin = new Padding(3, 4, 3, 4);
dataGridView.Name = "dataGridView";
dataGridView.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders;
dataGridView.RowTemplate.Height = 25;
- dataGridView.Size = new Size(799, 438);
+ dataGridView.Size = new Size(913, 555);
dataGridView.TabIndex = 1;
//
- // Component
- //
- Component.HeaderText = "Компонент";
- Component.Name = "Component";
- Component.ReadOnly = true;
- //
- // Canned
- //
- Canned.HeaderText = "Консервы";
- Canned.Name = "Canned";
- //
// Count
//
Count.HeaderText = "Количество";
+ Count.MinimumWidth = 6;
Count.Name = "Count";
Count.ReadOnly = true;
//
+ // Canned
+ //
+ Canned.HeaderText = "Консервы";
+ Canned.MinimumWidth = 6;
+ Canned.Name = "Canned";
+ //
+ // Component
+ //
+ Component.HeaderText = "Компонент";
+ Component.MinimumWidth = 6;
+ Component.Name = "Component";
+ Component.ReadOnly = true;
+ //
// FormReportCannedComponents
//
- AutoScaleDimensions = new SizeF(7F, 15F);
+ AutoScaleDimensions = new SizeF(8F, 19F);
AutoScaleMode = AutoScaleMode.Font;
- ClientSize = new Size(801, 484);
+ ClientSize = new Size(915, 613);
Controls.Add(dataGridView);
Controls.Add(buttonSaveToExcel);
+ Margin = new Padding(3, 4, 3, 4);
Name = "FormReportCannedComponents";
Text = "Компоненты по консервам";
+ Load += FormReportCannedComponents_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);
}
diff --git a/FishFactory/Forms/FormReportCannedComponents.cs b/FishFactory/Forms/FormReportCannedComponents.cs
index 83129d3..27c01be 100644
--- a/FishFactory/Forms/FormReportCannedComponents.cs
+++ b/FishFactory/Forms/FormReportCannedComponents.cs
@@ -18,14 +18,14 @@ namespace FishFactory.Forms
{
try
{
- var dict = _logic.GetCannedComponent();
+ var dict = _logic.GetCannedComponents();
if (dict != null)
{
dataGridView.Rows.Clear();
foreach (var elem in dict)
{
- dataGridView.Rows.Add(new object[] { elem.ComponentName, "", "" });
- foreach (var listElem in elem.Canneds)
+ dataGridView.Rows.Add(new object[] { elem.CannedName, "", "" });
+ foreach (var listElem in elem.Components)
{
dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 });
}
@@ -33,11 +33,11 @@ namespace FishFactory.Forms
dataGridView.Rows.Add(Array.Empty