ПИбд-22 Боровков М В 1 лабораторная работа #1

Closed
bekodeg wants to merge 22 commits from labWork1 into main
15 changed files with 173 additions and 172 deletions
Showing only changes of commit 31655eb324 - Show all commits

View File

@ -82,6 +82,7 @@
Controls.Add(textBoxName); Controls.Add(textBoxName);
Controls.Add(label1); Controls.Add(label1);
Name = "FormComponent"; Name = "FormComponent";
Load += this.FormComponent_Load;
ResumeLayout(false); ResumeLayout(false);
PerformLayout(); PerformLayout();
} }

View File

@ -117,163 +117,58 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>FormComponent</value>
</data>
<data name="&gt;&gt;button2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;textBoxCost.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;textBoxName.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;buttonCancel.Name" xml:space="preserve">
<value>buttonCancel</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="textBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>800, 450</value> <value>68, 6</value>
</data> </data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <data name="&gt;&gt;textBoxName.Type" xml:space="preserve">
<data name="textBoxCost.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;buttonSave.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="textBoxName.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;textBoxCost.Name" xml:space="preserve">
<value>textBoxCost</value>
</data>
<data name="&gt;&gt;textBoxName.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;buttonCancel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>8, 20</value>
</data>
<data name="button1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;button2.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;button1.Name" xml:space="preserve">
<value>button1</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;textBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;textBox1.Name" xml:space="preserve">
<value>textBox1</value>
</data>
<data name="&gt;&gt;buttonCancel.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;textBox1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="buttonSave.Location" type="System.Drawing.Point, System.Drawing">
<value>95, 85</value>
</data>
<data name="&gt;&gt;button1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;textBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing"> <data name="&gt;&gt;buttonCancel.ZOrder" xml:space="preserve">
<value>12, 42</value> <value>0</value>
</data> </data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve"> <data name="&gt;&gt;textBoxCost.Type" xml:space="preserve">
<value>3</value> <value>System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;button1.Parent" xml:space="preserve"> <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<value>$this</value> <data name="textBox1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data> </data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve"> <data name="&gt;&gt;textBox1.Parent" xml:space="preserve">
<value>$this</value> <value>$this</value>
</data> </data>
<data name="label1.TabIndex" type="System.Int32, mscorlib"> <data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
</data> </data>
<data name="&gt;&gt;buttonSave.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="textBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>68, 6</value>
</data>
<data name="&gt;&gt;button2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="buttonCancel.Location" type="System.Drawing.Point, System.Drawing">
<value>222, 85</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="buttonSave.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="button2.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;buttonSave.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;buttonSave.Name" xml:space="preserve"> <data name="&gt;&gt;buttonSave.Name" xml:space="preserve">
<value>buttonSave</value> <value>buttonSave</value>
</data> </data>
<data name="button2.Location" type="System.Drawing.Point, System.Drawing">
<value>222, 85</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>FormComponent</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing"> <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 9</value> <value>12, 9</value>
</data> </data>
<data name="button1.Location" type="System.Drawing.Point, System.Drawing"> <data name="&gt;&gt;textBoxName.ZOrder" xml:space="preserve">
<value>95, 85</value> <value>4</value>
</data> </data>
<data name="&gt;&gt;label2.Name" xml:space="preserve"> <data name="&gt;&gt;button2.Type" xml:space="preserve">
<value>label2</value> <value>System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;buttonCancel.ZOrder" xml:space="preserve"> <data name="&gt;&gt;textBoxCost.Parent" xml:space="preserve">
<value>0</value> <value>$this</value>
</data> </data>
<data name="buttonCancel.TabIndex" type="System.Int32, mscorlib"> <data name="$this.Text" xml:space="preserve">
<value>5</value> <value>FormComponent</value>
</data> </data>
<data name="textBox1.TabIndex" type="System.Int32, mscorlib"> <data name="textBoxName.TabIndex" type="System.Int32, mscorlib">
<value>1</value> <value>1</value>
</data> </data>
<data name="&gt;&gt;textBoxCost.Type" xml:space="preserve"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>800, 450</value>
</data> </data>
<data name="label2.TabIndex" type="System.Int32, mscorlib"> <data name="&gt;&gt;textBoxCost.ZOrder" xml:space="preserve">
<value>2</value> <value>2</value>
</data> </data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;button2.Name" xml:space="preserve">
<value>5</value> <value>button2</value>
</data>
<data name="&gt;&gt;textBoxName.Name" xml:space="preserve">
<value>textBoxName</value>
</data> </data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve"> <data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>$this</value> <value>$this</value>
@ -281,8 +176,14 @@
<data name="&gt;&gt;button1.Type" xml:space="preserve"> <data name="&gt;&gt;button1.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;textBoxName.Type" xml:space="preserve"> <data name="button1.Location" type="System.Drawing.Point, System.Drawing">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>95, 85</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="textBoxCost.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data> </data>
<data name="textBoxCost.Location" type="System.Drawing.Point, System.Drawing"> <data name="textBoxCost.Location" type="System.Drawing.Point, System.Drawing">
<value>95, 39</value> <value>95, 39</value>
@ -290,11 +191,110 @@
<data name="textBoxName.Location" type="System.Drawing.Point, System.Drawing"> <data name="textBoxName.Location" type="System.Drawing.Point, System.Drawing">
<value>95, 6</value> <value>95, 6</value>
</data> </data>
<data name="&gt;&gt;textBoxCost.ZOrder" xml:space="preserve"> <data name="&gt;&gt;button1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="buttonSave.Location" type="System.Drawing.Point, System.Drawing">
<value>95, 85</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>FormComponent</value>
</data>
<data name="&gt;&gt;textBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="button2.Location" type="System.Drawing.Point, System.Drawing">
<value>222, 85</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;buttonSave.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonSave.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;button2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="buttonCancel.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;button1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;buttonCancel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;buttonSave.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>8, 20</value>
</data>
<data name="&gt;&gt;textBox1.Name" xml:space="preserve">
<value>textBox1</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>2</value> <value>2</value>
</data> </data>
<data name="&gt;&gt;button2.Name" xml:space="preserve"> <data name="button2.TabIndex" type="System.Int32, mscorlib">
<value>button2</value> <value>5</value>
</data>
<data name="&gt;&gt;textBoxName.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;button1.Name" xml:space="preserve">
<value>button1</value>
</data>
<data name="&gt;&gt;buttonCancel.Name" xml:space="preserve">
<value>buttonCancel</value>
</data>
<data name="&gt;&gt;textBoxName.Name" xml:space="preserve">
<value>textBoxName</value>
</data>
<data name="&gt;&gt;buttonCancel.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="buttonCancel.Location" type="System.Drawing.Point, System.Drawing">
<value>222, 85</value>
</data>
<data name="&gt;&gt;textBoxCost.Name" xml:space="preserve">
<value>textBoxCost</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="buttonSave.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;textBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;button2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="button1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 42</value>
</data> </data>
<metadata name="$this.Language" type="System.Globalization.CultureInfo, System.Private.CoreLib, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"> <metadata name="$this.Language" type="System.Globalization.CultureInfo, System.Private.CoreLib, Culture=neutral, PublicKeyToken=7cec85d7bea7798e">
<value>ru</value> <value>ru</value>

View File

@ -147,30 +147,18 @@
<data name="label2.Text" xml:space="preserve"> <data name="label2.Text" xml:space="preserve">
<value>Цена</value> <value>Цена</value>
</data> </data>
<data name="buttonSave.Location" type="System.Drawing.Point, System.Drawing">
<value>95, 85</value>
</data>
<data name="buttonSave.Size" type="System.Drawing.Size, System.Drawing"> <data name="buttonSave.Size" type="System.Drawing.Size, System.Drawing">
<value>121, 29</value> <value>121, 29</value>
</data> </data>
<data name="buttonSave.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="buttonSave.Text" xml:space="preserve"> <data name="buttonSave.Text" xml:space="preserve">
<value>Сохранить</value> <value>Сохранить</value>
</data> </data>
<data name="buttonCancel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <data name="buttonCancel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="buttonCancel.Location" type="System.Drawing.Point, System.Drawing">
<value>222, 85</value>
</data>
<data name="buttonCancel.Size" type="System.Drawing.Size, System.Drawing"> <data name="buttonCancel.Size" type="System.Drawing.Size, System.Drawing">
<value>119, 29</value> <value>119, 29</value>
</data> </data>
<data name="buttonCancel.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="buttonCancel.Text" xml:space="preserve"> <data name="buttonCancel.Text" xml:space="preserve">
<value>Отмена</value> <value>Отмена</value>
</data> </data>

View File

@ -99,6 +99,7 @@
Controls.Add(dataGridView); Controls.Add(dataGridView);
Name = "FormComponents"; Name = "FormComponents";
Text = "Компоненты"; Text = "Компоненты";
Load += this.FormComponents_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false); ResumeLayout(false);
} }

View File

@ -123,6 +123,7 @@
Controls.Add(buttonSave); Controls.Add(buttonSave);
Name = "FormCreateOrder"; Name = "FormCreateOrder";
Text = "Заказ"; Text = "Заказ";
Load += this.FormCreateOrder_Load;
ResumeLayout(false); ResumeLayout(false);
PerformLayout(); PerformLayout();
} }

View File

@ -2,12 +2,6 @@
using SushiBarContracts.BindingModels; using SushiBarContracts.BindingModels;
using SushiBarContracts.BusinessLogicsContracts; using SushiBarContracts.BusinessLogicsContracts;
using SushiBarContracts.SearchModels; using SushiBarContracts.SearchModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SushiBar.Forms namespace SushiBar.Forms
{ {

View File

@ -72,14 +72,14 @@
// sushiToolStripMenuItem // sushiToolStripMenuItem
// //
sushiToolStripMenuItem.Name = "sushiToolStripMenuItem"; sushiToolStripMenuItem.Name = "sushiToolStripMenuItem";
sushiToolStripMenuItem.Size = new Size(224, 26); sushiToolStripMenuItem.Size = new Size(182, 26);
sushiToolStripMenuItem.Text = "Суши"; sushiToolStripMenuItem.Text = "Суши";
sushiToolStripMenuItem.Click += sushiToolStripMenuItem_Click; sushiToolStripMenuItem.Click += sushiToolStripMenuItem_Click;
// //
// componentsToolStripMenuItem // componentsToolStripMenuItem
// //
componentsToolStripMenuItem.Name = "componentsToolStripMenuItem"; componentsToolStripMenuItem.Name = "componentsToolStripMenuItem";
componentsToolStripMenuItem.Size = new Size(224, 26); componentsToolStripMenuItem.Size = new Size(182, 26);
componentsToolStripMenuItem.Text = "Компоненты"; componentsToolStripMenuItem.Text = "Компоненты";
componentsToolStripMenuItem.Click += componentsToolStripMenuItem_Click; componentsToolStripMenuItem.Click += componentsToolStripMenuItem_Click;
// //
@ -148,6 +148,7 @@
MainMenuStrip = menuStrip1; MainMenuStrip = menuStrip1;
Name = "FormMain"; Name = "FormMain";
Text = "Сушибар"; Text = "Сушибар";
Load += this.FormMain_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
menuStrip1.ResumeLayout(false); menuStrip1.ResumeLayout(false);
menuStrip1.PerformLayout(); menuStrip1.PerformLayout();

View File

@ -30,6 +30,7 @@
{ {
buttonAdd = new Button(); buttonAdd = new Button();
dataGridView = new DataGridView(); dataGridView = new DataGridView();
ID = new DataGridViewTextBoxColumn();
ComponentName = new DataGridViewTextBoxColumn(); ComponentName = new DataGridViewTextBoxColumn();
ComponentCount = new DataGridViewTextBoxColumn(); ComponentCount = new DataGridViewTextBoxColumn();
groupBox1 = new GroupBox(); groupBox1 = new GroupBox();
@ -62,7 +63,7 @@
dataGridView.AllowUserToAddRows = false; dataGridView.AllowUserToAddRows = false;
dataGridView.AllowUserToDeleteRows = false; dataGridView.AllowUserToDeleteRows = false;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Columns.AddRange(new DataGridViewColumn[] { ComponentName, ComponentCount }); dataGridView.Columns.AddRange(new DataGridViewColumn[] { ID, ComponentName, ComponentCount });
dataGridView.Dock = DockStyle.Left; dataGridView.Dock = DockStyle.Left;
dataGridView.Location = new Point(3, 24); dataGridView.Location = new Point(3, 24);
dataGridView.Margin = new Padding(3, 4, 3, 4); dataGridView.Margin = new Padding(3, 4, 3, 4);
@ -73,18 +74,29 @@
dataGridView.Size = new Size(630, 267); dataGridView.Size = new Size(630, 267);
dataGridView.TabIndex = 1; dataGridView.TabIndex = 1;
// //
// ID
//
ID.HeaderText = "";
ID.MinimumWidth = 6;
ID.Name = "ID";
ID.ReadOnly = true;
ID.Visible = false;
ID.Width = 125;
//
// ComponentName // ComponentName
// //
ComponentName.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; ComponentName.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
ComponentName.HeaderText = "Компонент"; ComponentName.HeaderText = "Компонент";
ComponentName.MinimumWidth = 6; ComponentName.MinimumWidth = 6;
ComponentName.Name = "ComponentName"; ComponentName.Name = "ComponentName";
ComponentName.ReadOnly = true;
// //
// ComponentCount // ComponentCount
// //
ComponentCount.HeaderText = "Количество"; ComponentCount.HeaderText = "Количество";
ComponentCount.MinimumWidth = 6; ComponentCount.MinimumWidth = 6;
ComponentCount.Name = "ComponentCount"; ComponentCount.Name = "ComponentCount";
ComponentCount.ReadOnly = true;
ComponentCount.Width = 125; ComponentCount.Width = 125;
// //
// groupBox1 // groupBox1
@ -208,6 +220,7 @@
Controls.Add(groupBox1); Controls.Add(groupBox1);
Name = "FormSushi"; Name = "FormSushi";
Text = "Суши"; Text = "Суши";
Load += this.FormSushi_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
groupBox1.ResumeLayout(false); groupBox1.ResumeLayout(false);
ResumeLayout(false); ResumeLayout(false);
@ -228,6 +241,7 @@
private Label label2; private Label label2;
private TextBox textBoxPrice; private TextBox textBoxPrice;
private TextBox textBoxName; private TextBox textBoxName;
private DataGridViewTextBoxColumn ID;
private DataGridViewTextBoxColumn ComponentName; private DataGridViewTextBoxColumn ComponentName;
private DataGridViewTextBoxColumn ComponentCount; private DataGridViewTextBoxColumn ComponentCount;
} }

View File

@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ComponentName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ComponentName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>

View File

@ -1,11 +1,6 @@
using SushiBarContracts.BusinessLogicsContracts; using SushiBarContracts.BusinessLogicsContracts;
using SushiBarContracts.ViewModels; using SushiBarContracts.ViewModels;
using SushiBarDataModels.Models; using SushiBarDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SushiBar.Forms namespace SushiBar.Forms
{ {

View File

@ -54,9 +54,9 @@ namespace SushiBar.Forms
if (_sushiComponents != null) if (_sushiComponents != null)
{ {
dataGridView.Rows.Clear(); dataGridView.Rows.Clear();
foreach (var pc in _sushiComponents) foreach (var sc in _sushiComponents)
{ {
dataGridView.Rows.Add(new object[] { pc.Key, pc.Value.Item1.ComponentName, pc.Value.Item2 }); dataGridView.Rows.Add(new object[] { sc.Key, sc.Value.Item1.ComponentName, sc.Value.Item2 });
} }
textBoxPrice.Text = CalcPrice().ToString(); textBoxPrice.Text = CalcPrice().ToString();
} }

View File

@ -38,18 +38,19 @@
// //
// dataGridView // dataGridView
// //
dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.ColumnHeader;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Dock = DockStyle.Left; dataGridView.Dock = DockStyle.Left;
dataGridView.Location = new Point(0, 0); dataGridView.Location = new Point(0, 0);
dataGridView.Name = "dataGridView"; dataGridView.Name = "dataGridView";
dataGridView.RowHeadersWidth = 51; dataGridView.RowHeadersWidth = 70;
dataGridView.RowTemplate.Height = 29; dataGridView.RowTemplate.Height = 29;
dataGridView.Size = new Size(668, 450); dataGridView.Size = new Size(762, 450);
dataGridView.TabIndex = 1; dataGridView.TabIndex = 1;
// //
// buttonRef // buttonRef
// //
buttonRef.Location = new Point(674, 117); buttonRef.Location = new Point(768, 117);
buttonRef.Name = "buttonRef"; buttonRef.Name = "buttonRef";
buttonRef.Size = new Size(114, 29); buttonRef.Size = new Size(114, 29);
buttonRef.TabIndex = 8; buttonRef.TabIndex = 8;
@ -59,7 +60,7 @@
// //
// buttonDel // buttonDel
// //
buttonDel.Location = new Point(674, 82); buttonDel.Location = new Point(768, 82);
buttonDel.Name = "buttonDel"; buttonDel.Name = "buttonDel";
buttonDel.Size = new Size(114, 29); buttonDel.Size = new Size(114, 29);
buttonDel.TabIndex = 7; buttonDel.TabIndex = 7;
@ -69,7 +70,7 @@
// //
// buttonUpd // buttonUpd
// //
buttonUpd.Location = new Point(674, 47); buttonUpd.Location = new Point(768, 47);
buttonUpd.Name = "buttonUpd"; buttonUpd.Name = "buttonUpd";
buttonUpd.Size = new Size(114, 29); buttonUpd.Size = new Size(114, 29);
buttonUpd.TabIndex = 6; buttonUpd.TabIndex = 6;
@ -79,7 +80,7 @@
// //
// buttonAdd // buttonAdd
// //
buttonAdd.Location = new Point(674, 12); buttonAdd.Location = new Point(768, 12);
buttonAdd.Name = "buttonAdd"; buttonAdd.Name = "buttonAdd";
buttonAdd.Size = new Size(114, 29); buttonAdd.Size = new Size(114, 29);
buttonAdd.TabIndex = 5; buttonAdd.TabIndex = 5;
@ -91,7 +92,7 @@
// //
AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450); ClientSize = new Size(893, 450);
Controls.Add(buttonRef); Controls.Add(buttonRef);
Controls.Add(buttonDel); Controls.Add(buttonDel);
Controls.Add(buttonUpd); Controls.Add(buttonUpd);
@ -99,6 +100,7 @@
Controls.Add(dataGridView); Controls.Add(dataGridView);
Name = "FormSushis"; Name = "FormSushis";
Text = "Суши"; Text = "Суши";
Load += this.FormSushis_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false); ResumeLayout(false);
} }

View File

@ -25,6 +25,7 @@ namespace SushiBar
var services = new ServiceCollection(); var services = new ServiceCollection();
ConfigureServices(services); ConfigureServices(services);
_serviceProvider = services.BuildServiceProvider(); _serviceProvider = services.BuildServiceProvider();
ILogger logger = _serviceProvider.GetService<ILogger>();
Application.Run(_serviceProvider.GetRequiredService<FormMain>()); Application.Run(_serviceProvider.GetRequiredService<FormMain>());
} }
private static void ConfigureServices(ServiceCollection services) private static void ConfigureServices(ServiceCollection services)

View File

@ -12,7 +12,7 @@ namespace SushiBarBusinessLogic.BusinessLogics
{ {
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IOrderStorage _orderStorage; private readonly IOrderStorage _orderStorage;
public OrderLogic(ILogger logger, IOrderStorage orderStorage) public OrderLogic(ILogger<OrderLogic> logger, IOrderStorage orderStorage)
{ {
_logger = logger; _logger = logger;
_orderStorage = orderStorage; _orderStorage = orderStorage;

View File

@ -11,7 +11,7 @@ namespace SushiBarBusinessLogic.BusinessLogics
{ {
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly ISushiStorage _sushiStorage; private readonly ISushiStorage _sushiStorage;
public SushiLogic(ILogger logger, ISushiStorage sushiStorage) public SushiLogic(ILogger<SushiLogic> logger, ISushiStorage sushiStorage)
{ {
_logger = logger; _logger = logger;
_sushiStorage = sushiStorage; _sushiStorage = sushiStorage;