Лабораторная работа №1 (Изменение 2)

This commit is contained in:
Aidar 2024-12-05 17:53:19 +04:00
parent 36793fef25
commit 7d0cf17990
6 changed files with 39 additions and 39 deletions

View File

@ -29,7 +29,7 @@
private void InitializeComponent()
{
panel = new Panel();
buttonEdit = new Button();
buttonUpdate = new Button();
buttonDelete = new Button();
buttonAdd = new Button();
dataGridViewData = new DataGridView();
@ -39,7 +39,7 @@
//
// panel
//
panel.Controls.Add(buttonEdit);
panel.Controls.Add(buttonUpdate);
panel.Controls.Add(buttonDelete);
panel.Controls.Add(buttonAdd);
panel.Dock = DockStyle.Right;
@ -48,16 +48,16 @@
panel.Size = new Size(102, 411);
panel.TabIndex = 1;
//
// buttonEdit
// buttonUpdate
//
buttonEdit.BackgroundImage = Properties.Resources.Edit;
buttonEdit.BackgroundImageLayout = ImageLayout.Stretch;
buttonEdit.Location = new Point(20, 196);
buttonEdit.Name = "buttonEdit";
buttonEdit.Size = new Size(70, 70);
buttonEdit.TabIndex = 3;
buttonEdit.UseVisualStyleBackColor = true;
buttonEdit.Click += ButtonEdit_Click;
buttonUpdate.BackgroundImage = Properties.Resources.Edit;
buttonUpdate.BackgroundImageLayout = ImageLayout.Stretch;
buttonUpdate.Location = new Point(20, 196);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(70, 70);
buttonUpdate.TabIndex = 3;
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += ButtonUpdate_Click;
//
// buttonDelete
//
@ -119,7 +119,7 @@
#endregion
private Panel panel;
private Button buttonEdit;
private Button buttonUpdate;
private Button buttonDelete;
private Button buttonAdd;
private DataGridView dataGridViewData;

View File

@ -37,7 +37,7 @@ public partial class FormBuses : Form
MessageBox.Show(ex.Message, "Ошибка при добавлении", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void ButtonEdit_Click(object sender, EventArgs e)
private void ButtonUpdate_Click(object sender, EventArgs e)
{
if (!TryGetIdentifierFromSelectedRow(out var findId))
{

View File

@ -29,7 +29,7 @@
private void InitializeComponent()
{
panel = new Panel();
buttonEdit = new Button();
buttonUpdate = new Button();
buttonDelete = new Button();
buttonAdd = new Button();
dataGridViewData = new DataGridView();
@ -39,7 +39,7 @@
//
// panel
//
panel.Controls.Add(buttonEdit);
panel.Controls.Add(buttonUpdate);
panel.Controls.Add(buttonDelete);
panel.Controls.Add(buttonAdd);
panel.Dock = DockStyle.Right;
@ -48,16 +48,16 @@
panel.Size = new Size(102, 411);
panel.TabIndex = 0;
//
// buttonEdit
// buttonUpdate
//
buttonEdit.BackgroundImage = Properties.Resources.Edit;
buttonEdit.BackgroundImageLayout = ImageLayout.Stretch;
buttonEdit.Location = new Point(20, 197);
buttonEdit.Name = "buttonEdit";
buttonEdit.Size = new Size(70, 70);
buttonEdit.TabIndex = 3;
buttonEdit.UseVisualStyleBackColor = true;
buttonEdit.Click += ButtonEdit_Click;
buttonUpdate.BackgroundImage = Properties.Resources.Edit;
buttonUpdate.BackgroundImageLayout = ImageLayout.Stretch;
buttonUpdate.Location = new Point(20, 197);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(70, 70);
buttonUpdate.TabIndex = 3;
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += ButtonUpdate_Click;
//
// buttonDelete
//
@ -122,6 +122,6 @@
private DataGridView dataGridViewData;
private Button buttonAdd;
private Button buttonDelete;
private Button buttonEdit;
private Button buttonUpdate;
}
}

View File

@ -37,7 +37,7 @@ public partial class FormEmployees : Form
MessageBox.Show(ex.Message, "Ошибка при добавлении", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void ButtonEdit_Click(object sender, EventArgs e)
private void ButtonUpdate_Click(object sender, EventArgs e)
{
if (!TryGetIdentifierFromSelectedRow(out var findId))
{

View File

@ -30,7 +30,7 @@
{
dataGridViewData = new DataGridView();
panel = new Panel();
buttonEdit = new Button();
buttonUpdate = new Button();
buttonDelete = new Button();
buttonAdd = new Button();
((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit();
@ -57,7 +57,7 @@
//
// panel
//
panel.Controls.Add(buttonEdit);
panel.Controls.Add(buttonUpdate);
panel.Controls.Add(buttonDelete);
panel.Controls.Add(buttonAdd);
panel.Dock = DockStyle.Right;
@ -66,16 +66,16 @@
panel.Size = new Size(103, 411);
panel.TabIndex = 1;
//
// buttonEdit
// buttonUpdate
//
buttonEdit.BackgroundImage = Properties.Resources.Edit;
buttonEdit.BackgroundImageLayout = ImageLayout.Stretch;
buttonEdit.Location = new Point(14, 191);
buttonEdit.Name = "buttonEdit";
buttonEdit.Size = new Size(70, 70);
buttonEdit.TabIndex = 2;
buttonEdit.UseVisualStyleBackColor = true;
buttonEdit.Click += ButtonEdit_Click;
buttonUpdate.BackgroundImage = Properties.Resources.Edit;
buttonUpdate.BackgroundImageLayout = ImageLayout.Stretch;
buttonUpdate.Location = new Point(14, 191);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(70, 70);
buttonUpdate.TabIndex = 2;
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += ButtonUpdate_Click;
//
// buttonDelete
//
@ -120,7 +120,7 @@
private DataGridView dataGridViewData;
private Panel panel;
private Button buttonEdit;
private Button buttonUpdate;
private Button buttonDelete;
private Button buttonAdd;
}

View File

@ -61,7 +61,7 @@ public partial class FormRoutes : Form
}
}
private void ButtonEdit_Click(object sender, EventArgs e)
private void ButtonUpdate_Click(object sender, EventArgs e)
{
if (!TryGetIdentifierFromSelectedRow(out var findId))
{