diff --git a/ComputersShop/ComputersShopView/FormMain.Designer.cs b/ComputersShop/ComputersShopView/FormMain.Designer.cs index acf67e3..4e4e11b 100644 --- a/ComputersShop/ComputersShopView/FormMain.Designer.cs +++ b/ComputersShop/ComputersShopView/FormMain.Designer.cs @@ -35,9 +35,9 @@ buttonRef = new Button(); dataGridView = new DataGridView(); menuStrip = new MenuStrip(); - компонентыToolStripMenuItem = new ToolStripMenuItem(); - компонентыToolStripMenuItem1 = new ToolStripMenuItem(); - изделияToolStripMenuItem = new ToolStripMenuItem(); + ListToolStripMenuItem = new ToolStripMenuItem(); + ComponentsToolStripMenuItem = new ToolStripMenuItem(); + ComputersToolStripMenuItem = new ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); menuStrip.SuspendLayout(); SuspendLayout(); @@ -104,33 +104,33 @@ // // menuStrip // - menuStrip.Items.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem }); + menuStrip.Items.AddRange(new ToolStripItem[] { ListToolStripMenuItem }); menuStrip.Location = new Point(0, 0); menuStrip.Name = "menuStrip"; menuStrip.Size = new Size(921, 24); menuStrip.TabIndex = 7; menuStrip.Text = "menuStrip"; // - // компонентыToolStripMenuItem + // ListToolStripMenuItem // - компонентыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem1, изделияToolStripMenuItem }); - компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem"; - компонентыToolStripMenuItem.Size = new Size(94, 20); - компонентыToolStripMenuItem.Text = "Справочники"; + ListToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ComponentsToolStripMenuItem, ComputersToolStripMenuItem }); + ListToolStripMenuItem.Name = "ListToolStripMenuItem"; + ListToolStripMenuItem.Size = new Size(94, 20); + ListToolStripMenuItem.Text = "Справочники"; // - // компонентыToolStripMenuItem1 + // ComponentsToolStripMenuItem // - компонентыToolStripMenuItem1.Name = "компонентыToolStripMenuItem1"; - компонентыToolStripMenuItem1.Size = new Size(145, 22); - компонентыToolStripMenuItem1.Text = "Компоненты"; - компонентыToolStripMenuItem1.Click += КомпонентыToolStripMenuItem_Click; + ComponentsToolStripMenuItem.Name = "ComponentsToolStripMenuItem1"; + ComponentsToolStripMenuItem.Size = new Size(180, 22); + ComponentsToolStripMenuItem.Text = "Компоненты"; + ComponentsToolStripMenuItem.Click += ComponentsToolStripMenuItem_Click; // - // изделияToolStripMenuItem + // ComputersToolStripMenuItem // - изделияToolStripMenuItem.Name = "изделияToolStripMenuItem"; - изделияToolStripMenuItem.Size = new Size(145, 22); - изделияToolStripMenuItem.Text = "Изделия"; - изделияToolStripMenuItem.Click += ИзделияToolStripMenuItem_Click; + ComputersToolStripMenuItem.Name = "ComputersToolStripMenuItem"; + ComputersToolStripMenuItem.Size = new Size(180, 22); + ComputersToolStripMenuItem.Text = "Изделия"; + ComputersToolStripMenuItem.Click += ComputersToolStripMenuItem_Click; // // FormMain // @@ -163,8 +163,8 @@ private Button buttonRef; private DataGridView dataGridView; private MenuStrip menuStrip; - private ToolStripMenuItem компонентыToolStripMenuItem; - private ToolStripMenuItem компонентыToolStripMenuItem1; - private ToolStripMenuItem изделияToolStripMenuItem; + private ToolStripMenuItem ListToolStripMenuItem; + private ToolStripMenuItem ComponentsToolStripMenuItem; + private ToolStripMenuItem ComputersToolStripMenuItem; } } \ No newline at end of file diff --git a/ComputersShop/ComputersShopView/FormMain.cs b/ComputersShop/ComputersShopView/FormMain.cs index e320b79..ed71f42 100644 --- a/ComputersShop/ComputersShopView/FormMain.cs +++ b/ComputersShop/ComputersShopView/FormMain.cs @@ -49,7 +49,7 @@ namespace ComputersShopView MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } } - private void КомпонентыToolStripMenuItem_Click(object sender, EventArgs + private void ComponentsToolStripMenuItem_Click(object sender, EventArgs e) { var service = @@ -59,7 +59,7 @@ namespace ComputersShopView form.ShowDialog(); } } - private void ИзделияToolStripMenuItem_Click(object sender, EventArgs e) + private void ComputersToolStripMenuItem_Click(object sender, EventArgs e) { var service = Program.ServiceProvider?.GetService(typeof(FormComputers)); if (service is FormComputers form) @@ -170,5 +170,22 @@ namespace ComputersShopView { LoadData(); } + private void shopsToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormShops)); + if (service is FormShops form) + { + form.ShowDialog(); + } + } + + private void transactionToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormCreateSupply)); + if (service is FormCreateSupply form) + { + form.ShowDialog(); + } + } } }