From 05ac38f5f94bd7016601157755e9bc6d32f14344 Mon Sep 17 00:00:00 2001 From: Zakharov_Rostislav Date: Mon, 22 Apr 2024 21:24:16 +0400 Subject: [PATCH] lab-6 some changes in FormMain --- .../BlacksmithWorkshop/FormMain.Designer.cs | 16 ++++++++-------- .../BlacksmithWorkshop/FormMain.cs | 7 ++++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs index 76a5c06..a7639bd 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs @@ -54,7 +54,7 @@ menuStrip.Items.AddRange(new ToolStripItem[] { GuidesToolStripMenuItem, ReportsToolStripMenuItem }); menuStrip.Location = new Point(0, 0); menuStrip.Name = "menuStrip"; - menuStrip.Size = new Size(1011, 24); + menuStrip.Size = new Size(1267, 24); menuStrip.TabIndex = 0; menuStrip.Text = "Меню"; // @@ -134,12 +134,12 @@ dataGridView.Location = new Point(0, 23); dataGridView.Name = "dataGridView"; dataGridView.RowTemplate.Height = 25; - dataGridView.Size = new Size(847, 427); + dataGridView.Size = new Size(1101, 427); dataGridView.TabIndex = 1; // // buttonCreateOrder // - buttonCreateOrder.Location = new Point(853, 38); + buttonCreateOrder.Location = new Point(1107, 27); buttonCreateOrder.Name = "buttonCreateOrder"; buttonCreateOrder.Size = new Size(148, 31); buttonCreateOrder.TabIndex = 2; @@ -149,7 +149,7 @@ // // buttonRefresh // - buttonRefresh.Location = new Point(853, 186); + buttonRefresh.Location = new Point(1107, 175); buttonRefresh.Name = "buttonRefresh"; buttonRefresh.Size = new Size(148, 31); buttonRefresh.TabIndex = 3; @@ -159,7 +159,7 @@ // // buttonIssued // - buttonIssued.Location = new Point(853, 149); + buttonIssued.Location = new Point(1107, 138); buttonIssued.Name = "buttonIssued"; buttonIssued.Size = new Size(148, 31); buttonIssued.TabIndex = 4; @@ -169,7 +169,7 @@ // // buttonReady // - buttonReady.Location = new Point(853, 112); + buttonReady.Location = new Point(1107, 101); buttonReady.Name = "buttonReady"; buttonReady.Size = new Size(148, 31); buttonReady.TabIndex = 5; @@ -179,7 +179,7 @@ // // buttonTakeInWork // - buttonTakeInWork.Location = new Point(853, 75); + buttonTakeInWork.Location = new Point(1107, 64); buttonTakeInWork.Name = "buttonTakeInWork"; buttonTakeInWork.Size = new Size(148, 31); buttonTakeInWork.TabIndex = 6; @@ -191,7 +191,7 @@ // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(1011, 450); + ClientSize = new Size(1267, 450); Controls.Add(buttonTakeInWork); Controls.Add(buttonReady); Controls.Add(buttonIssued); diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs index be207e7..70600d7 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs @@ -52,8 +52,10 @@ namespace BlacksmithWorkshop dataGridView.DataSource = list; dataGridView.Columns["ManufactureId"].Visible = false; dataGridView.Columns["ImplementerId"].Visible = false; - dataGridView.Columns["ManufactureName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; dataGridView.Columns["ClientId"].Visible = false; + dataGridView.Columns["ManufactureName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + dataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; } _logger.LogInformation("Загрузка заказов"); } @@ -97,8 +99,7 @@ namespace BlacksmithWorkshop { if (dataGridView.SelectedRows.Count == 1) { - int id = - Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); + int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); _logger.LogInformation("Заказ №{id}. Меняется статус на 'В работе'", id); try {