1 усложненная

This commit is contained in:
kagbie3nn@mail.ru 2024-04-12 19:44:54 +04:00
parent dd60c2bef2
commit 80db0d4bb7
2 changed files with 41 additions and 24 deletions

View File

@ -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;
}
}

View File

@ -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();
}
}
}
}