diff --git a/SecuritySystem/SecuritySystemView/FormMain.Designer.cs b/SecuritySystem/SecuritySystemView/FormMain.Designer.cs index 0d3fb3e..8177b93 100644 --- a/SecuritySystem/SecuritySystemView/FormMain.Designer.cs +++ b/SecuritySystem/SecuritySystemView/FormMain.Designer.cs @@ -32,13 +32,14 @@ справочникиToolStripMenuItem = new ToolStripMenuItem(); ComponentsToolStripMenuItem = new ToolStripMenuItem(); SecuresToolStripMenuItem = new ToolStripMenuItem(); + магазиныToolStripMenuItem = new ToolStripMenuItem(); dataGridView = new DataGridView(); buttonCreateOrder = new Button(); buttonTakeOrderInWork = new Button(); buttonOrderReady = new Button(); button4 = new Button(); buttonRefresh = new Button(); - магазиныToolStripMenuItem = new ToolStripMenuItem(); + пополнениеМагазинаToolStripMenuItem = new ToolStripMenuItem(); menuStrip.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); SuspendLayout(); @@ -46,7 +47,7 @@ // menuStrip // menuStrip.ImageScalingSize = new Size(20, 20); - menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem }); + menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, пополнениеМагазинаToolStripMenuItem }); menuStrip.Location = new Point(0, 0); menuStrip.Name = "menuStrip"; menuStrip.Size = new Size(1043, 28); @@ -74,6 +75,13 @@ SecuresToolStripMenuItem.Text = "Изделия"; SecuresToolStripMenuItem.Click += SecuresToolStripMenuItem_Click; // + // магазиныToolStripMenuItem + // + магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem"; + магазиныToolStripMenuItem.Size = new Size(224, 26); + магазиныToolStripMenuItem.Text = "Магазины"; + магазиныToolStripMenuItem.Click += ShopsToolStripMenuItem_Click; + // // dataGridView // dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; @@ -143,12 +151,12 @@ buttonRefresh.UseVisualStyleBackColor = true; buttonRefresh.Click += ButtonRefresh_Click; // - // магазиныToolStripMenuItem + // пополнениеМагазинаToolStripMenuItem // - магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem"; - магазиныToolStripMenuItem.Size = new Size(224, 26); - магазиныToolStripMenuItem.Text = "Магазины"; - магазиныToolStripMenuItem.Click += ShopsToolStripMenuItem_Click; + пополнениеМагазинаToolStripMenuItem.Name = "пополнениеМагазинаToolStripMenuItem"; + пополнениеМагазинаToolStripMenuItem.Size = new Size(182, 24); + пополнениеМагазинаToolStripMenuItem.Text = "Пополнение магазина"; + пополнениеМагазинаToolStripMenuItem.Click += SupplyShopToolStripMenuItem_Click; // // FormMain // @@ -186,5 +194,6 @@ private Button button4; private Button buttonRefresh; private ToolStripMenuItem магазиныToolStripMenuItem; + private ToolStripMenuItem пополнениеМагазинаToolStripMenuItem; } } \ No newline at end of file diff --git a/SecuritySystem/SecuritySystemView/FormMain.cs b/SecuritySystem/SecuritySystemView/FormMain.cs index a3d0dc1..0e33e70 100644 --- a/SecuritySystem/SecuritySystemView/FormMain.cs +++ b/SecuritySystem/SecuritySystemView/FormMain.cs @@ -145,5 +145,14 @@ namespace SecuritySystemView form.ShowDialog(); } } + + private void SupplyShopToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormShopSupply)); + if (service is FormShopSupply form) + { + form.ShowDialog(); + } + } } }