diff --git a/FishFactory/FormCanned.Designer.cs b/FishFactory/FormCanned.Designer.cs index db5feff..8297f20 100644 --- a/FishFactory/FormCanned.Designer.cs +++ b/FishFactory/FormCanned.Designer.cs @@ -35,14 +35,14 @@ buttonDel = new Button(); buttonRef = new Button(); dataGridView = new DataGridView(); - Number = new DataGridViewTextBoxColumn(); - Component = new DataGridViewTextBoxColumn(); - Count = new DataGridViewTextBoxColumn(); textBoxName = new TextBox(); textBoxPrice = new TextBox(); groupBox1 = new GroupBox(); buttonSave = new Button(); buttonCancel = new Button(); + Number = new DataGridViewTextBoxColumn(); + Component = new DataGridViewTextBoxColumn(); + Count = new DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); groupBox1.SuspendLayout(); SuspendLayout(); @@ -124,27 +124,6 @@ dataGridView.Size = new Size(627, 443); dataGridView.TabIndex = 4; // - // Number - // - Number.HeaderText = "Номер"; - Number.MinimumWidth = 6; - Number.Name = "Number"; - Number.Width = 60; - // - // Component - // - Component.HeaderText = "Компонент"; - Component.MinimumWidth = 6; - Component.Name = "Component"; - Component.Width = 125; - // - // Count - // - Count.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; - Count.HeaderText = "Количество"; - Count.MinimumWidth = 6; - Count.Name = "Count"; - // // textBoxName // textBoxName.Location = new Point(107, 18); @@ -201,6 +180,31 @@ buttonCancel.UseVisualStyleBackColor = true; buttonCancel.Click += buttonCancel_Click; // + // Number + // + Number.HeaderText = "Номер"; + Number.MinimumWidth = 6; + Number.Name = "Number"; + Number.ReadOnly = true; + Number.Visible = false; + Number.Width = 60; + // + // Component + // + Component.HeaderText = "Компонент"; + Component.MinimumWidth = 6; + Component.Name = "Component"; + Component.ReadOnly = true; + Component.Width = 125; + // + // Count + // + Count.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + Count.HeaderText = "Количество"; + Count.MinimumWidth = 6; + Count.Name = "Count"; + Count.ReadOnly = true; + // // FormCanned // AutoScaleDimensions = new SizeF(8F, 20F); diff --git a/FishFactory/FormCanneds.Designer.cs b/FishFactory/FormCanneds.Designer.cs index 59ee6c4..3ce1fb8 100644 --- a/FishFactory/FormCanneds.Designer.cs +++ b/FishFactory/FormCanneds.Designer.cs @@ -89,6 +89,7 @@ dataGridView.ReadOnly = true; dataGridView.RowHeadersWidth = 51; dataGridView.RowTemplate.Height = 24; + dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dataGridView.Size = new Size(709, 568); dataGridView.TabIndex = 5; // diff --git a/FishFactory/FormMain.Designer.cs b/FishFactory/FormMain.Designer.cs index f76b064..20fcb49 100644 --- a/FishFactory/FormMain.Designer.cs +++ b/FishFactory/FormMain.Designer.cs @@ -40,7 +40,7 @@ buttonIssuedOrder = new Button(); buttonRef = new Button(); dataGridView = new DataGridView(); - toolStripLabelReplenish = new ToolStripLabel(); + toolStripLabelReplenish2 = new ToolStripLabel(); toolStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); SuspendLayout(); @@ -48,7 +48,7 @@ // toolStrip1 // toolStrip1.ImageScalingSize = new Size(20, 20); - toolStrip1.Items.AddRange(new ToolStripItem[] { toolStripDropDownButton1, toolStripLabelReplenish }); + toolStrip1.Items.AddRange(new ToolStripItem[] { toolStripDropDownButton1, toolStripLabelReplenish2 }); toolStrip1.Location = new Point(0, 0); toolStrip1.Name = "toolStrip1"; toolStrip1.Size = new Size(1107, 27); @@ -68,21 +68,21 @@ // компонентыToolStripMenuItem // компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem"; - компонентыToolStripMenuItem.Size = new Size(224, 26); + компонентыToolStripMenuItem.Size = new Size(182, 26); компонентыToolStripMenuItem.Text = "Компоненты"; компонентыToolStripMenuItem.Click += компонентыToolStripMenuItem_Click; // // консервыToolStripMenuItem // консервыToolStripMenuItem.Name = "консервыToolStripMenuItem"; - консервыToolStripMenuItem.Size = new Size(224, 26); + консервыToolStripMenuItem.Size = new Size(182, 26); консервыToolStripMenuItem.Text = "Консервы"; консервыToolStripMenuItem.Click += консервыToolStripMenuItem_Click; // // магазиныToolStripMenuItem // магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem"; - магазиныToolStripMenuItem.Size = new Size(224, 26); + магазиныToolStripMenuItem.Size = new Size(182, 26); магазиныToolStripMenuItem.Text = "Магазины"; магазиныToolStripMenuItem.Click += магазиныToolStripMenuItem_Click; // @@ -154,12 +154,13 @@ dataGridView.Size = new Size(872, 580); dataGridView.TabIndex = 6; // - // toolStripLabelReplenish + // toolStripLabelReplenish2 // - toolStripLabelReplenish.Name = "toolStripLabelReplenish"; - toolStripLabelReplenish.Size = new Size(168, 24); - toolStripLabelReplenish.Text = "Пополнение магазина"; - toolStripLabelReplenish.Click += toolStripLabelReplenish_Click; + toolStripLabelReplenish2.DisplayStyle = ToolStripItemDisplayStyle.Text; + toolStripLabelReplenish2.Name = "toolStripLabelReplenish2"; + toolStripLabelReplenish2.Size = new Size(168, 24); + toolStripLabelReplenish2.Text = "Пополнение магазина"; + toolStripLabelReplenish2.Click += toolStripLabelReplenish_Click; // // FormMain // @@ -197,6 +198,6 @@ private ToolStripMenuItem компонентыToolStripMenuItem; private ToolStripMenuItem консервыToolStripMenuItem; private ToolStripMenuItem магазиныToolStripMenuItem; - private ToolStripLabel toolStripLabelReplenish; + private ToolStripLabel toolStripLabelReplenish2; } } \ No newline at end of file diff --git a/FishFactory/FormShop.cs b/FishFactory/FormShop.cs index 2793743..c6d705e 100644 --- a/FishFactory/FormShop.cs +++ b/FishFactory/FormShop.cs @@ -61,7 +61,7 @@ namespace FishFactory.Forms dataGridView.Rows.Clear(); foreach (var sr in _shopCanneds) { - dataGridView.Rows.Add(new object[] { sr.Key, sr.Value.Item1.CannedName, sr.Value.Item2 }); + dataGridView.Rows.Add(new object[] { sr.Value.Item1.CannedName, sr.Value.Item2}); } } } diff --git a/FishFactory/FormShops.Designer.cs b/FishFactory/FormShops.Designer.cs index 0b6ebdd..7e771a9 100644 --- a/FishFactory/FormShops.Designer.cs +++ b/FishFactory/FormShops.Designer.cs @@ -46,6 +46,7 @@ dataGridView.ReadOnly = true; dataGridView.RowHeadersWidth = 51; dataGridView.RowTemplate.Height = 29; + dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dataGridView.Size = new Size(525, 673); dataGridView.TabIndex = 0; //