diff --git a/CarRepairShop/CarRepairShop/FormCar.Designer.cs b/CarRepairShop/CarRepairShop/FormCar.Designer.cs
index 35ec40b..b1c5cfb 100644
--- a/CarRepairShop/CarRepairShop/FormCar.Designer.cs
+++ b/CarRepairShop/CarRepairShop/FormCar.Designer.cs
@@ -33,14 +33,16 @@
this.textBoxName = new System.Windows.Forms.TextBox();
this.textBoxPrice = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.ButtonRef = new System.Windows.Forms.Button();
+ this.ButtonDel = new System.Windows.Forms.Button();
+ this.ButtonUpd = new System.Windows.Forms.Button();
+ this.ButtonAdd = new System.Windows.Forms.Button();
this.dataGridView = new System.Windows.Forms.DataGridView();
this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Деталь = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Количество = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.ButtonAdd = new System.Windows.Forms.Button();
- this.ButtonUpd = new System.Windows.Forms.Button();
- this.ButtonDel = new System.Windows.Forms.Button();
- this.ButtonRef = new System.Windows.Forms.Button();
+ this.ButtonSave = new System.Windows.Forms.Button();
+ this.ButtonCancel = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.SuspendLayout();
@@ -50,18 +52,18 @@
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(10, 7);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(38, 15);
+ this.label1.Size = new System.Drawing.Size(62, 15);
this.label1.TabIndex = 0;
- this.label1.Text = "label1";
+ this.label1.Text = "Название:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(10, 33);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(38, 15);
+ this.label2.Size = new System.Drawing.Size(70, 15);
this.label2.TabIndex = 1;
- this.label2.Text = "label2";
+ this.label2.Text = "Стоимость:";
//
// textBoxName
//
@@ -91,6 +93,46 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Детали";
//
+ // ButtonRef
+ //
+ this.ButtonRef.Location = new System.Drawing.Point(538, 175);
+ this.ButtonRef.Name = "ButtonRef";
+ this.ButtonRef.Size = new System.Drawing.Size(106, 38);
+ this.ButtonRef.TabIndex = 4;
+ this.ButtonRef.Text = "Обновить";
+ this.ButtonRef.UseVisualStyleBackColor = true;
+ this.ButtonRef.Click += new System.EventHandler(this.ButtonRef_Click);
+ //
+ // ButtonDel
+ //
+ this.ButtonDel.Location = new System.Drawing.Point(538, 121);
+ this.ButtonDel.Name = "ButtonDel";
+ this.ButtonDel.Size = new System.Drawing.Size(106, 38);
+ this.ButtonDel.TabIndex = 3;
+ this.ButtonDel.Text = "Удалить";
+ this.ButtonDel.UseVisualStyleBackColor = true;
+ this.ButtonDel.Click += new System.EventHandler(this.ButtonDel_Click);
+ //
+ // ButtonUpd
+ //
+ this.ButtonUpd.Location = new System.Drawing.Point(538, 69);
+ this.ButtonUpd.Name = "ButtonUpd";
+ this.ButtonUpd.Size = new System.Drawing.Size(106, 38);
+ this.ButtonUpd.TabIndex = 2;
+ this.ButtonUpd.Text = "Изменить";
+ this.ButtonUpd.UseVisualStyleBackColor = true;
+ this.ButtonUpd.Click += new System.EventHandler(this.ButtonUpd_Click);
+ //
+ // ButtonAdd
+ //
+ this.ButtonAdd.Location = new System.Drawing.Point(538, 20);
+ this.ButtonAdd.Name = "ButtonAdd";
+ this.ButtonAdd.Size = new System.Drawing.Size(106, 38);
+ this.ButtonAdd.TabIndex = 1;
+ this.ButtonAdd.Text = "Добавить";
+ this.ButtonAdd.UseVisualStyleBackColor = true;
+ this.ButtonAdd.Click += new System.EventHandler(this.ButtonAdd_Click);
+ //
// dataGridView
//
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
@@ -126,54 +168,40 @@
this.Количество.Name = "Количество";
this.Количество.Width = 125;
//
- // ButtonAdd
+ // ButtonSave
//
- this.ButtonAdd.Location = new System.Drawing.Point(538, 20);
- this.ButtonAdd.Name = "ButtonAdd";
- this.ButtonAdd.Size = new System.Drawing.Size(106, 38);
- this.ButtonAdd.TabIndex = 1;
- this.ButtonAdd.Text = "Добавить";
- this.ButtonAdd.UseVisualStyleBackColor = true;
+ this.ButtonSave.Location = new System.Drawing.Point(507, 307);
+ this.ButtonSave.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.ButtonSave.Name = "ButtonSave";
+ this.ButtonSave.Size = new System.Drawing.Size(82, 22);
+ this.ButtonSave.TabIndex = 5;
+ this.ButtonSave.Text = "Сохранить";
+ this.ButtonSave.UseVisualStyleBackColor = true;
//
- // ButtonUpd
+ // ButtonCancel
//
- this.ButtonUpd.Location = new System.Drawing.Point(538, 69);
- this.ButtonUpd.Name = "ButtonUpd";
- this.ButtonUpd.Size = new System.Drawing.Size(106, 38);
- this.ButtonUpd.TabIndex = 2;
- this.ButtonUpd.Text = "Изменить";
- this.ButtonUpd.UseVisualStyleBackColor = true;
- //
- // ButtonDel
- //
- this.ButtonDel.Location = new System.Drawing.Point(538, 121);
- this.ButtonDel.Name = "ButtonDel";
- this.ButtonDel.Size = new System.Drawing.Size(106, 38);
- this.ButtonDel.TabIndex = 3;
- this.ButtonDel.Text = "Удалить";
- this.ButtonDel.UseVisualStyleBackColor = true;
- //
- // ButtonRef
- //
- this.ButtonRef.Location = new System.Drawing.Point(538, 175);
- this.ButtonRef.Name = "ButtonRef";
- this.ButtonRef.Size = new System.Drawing.Size(106, 38);
- this.ButtonRef.TabIndex = 4;
- this.ButtonRef.Text = "Обновить";
- this.ButtonRef.UseVisualStyleBackColor = true;
+ this.ButtonCancel.Location = new System.Drawing.Point(607, 307);
+ this.ButtonCancel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.ButtonCancel.Name = "ButtonCancel";
+ this.ButtonCancel.Size = new System.Drawing.Size(82, 22);
+ this.ButtonCancel.TabIndex = 6;
+ this.ButtonCancel.Text = "Отмена";
+ this.ButtonCancel.UseVisualStyleBackColor = true;
//
// FormCar
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(700, 338);
+ this.Controls.Add(this.ButtonCancel);
+ this.Controls.Add(this.ButtonSave);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.textBoxPrice);
this.Controls.Add(this.textBoxName);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "FormCar";
- this.Text = "FormCar";
+ this.Text = "Автомобиль";
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.ResumeLayout(false);
@@ -196,5 +224,7 @@
private DataGridViewTextBoxColumn ID;
private DataGridViewTextBoxColumn Деталь;
private DataGridViewTextBoxColumn Количество;
+ private Button ButtonSave;
+ private Button ButtonCancel;
}
}
\ No newline at end of file
diff --git a/CarRepairShop/CarRepairShop/FormCar.resx b/CarRepairShop/CarRepairShop/FormCar.resx
index 9405c8d..99108c3 100644
--- a/CarRepairShop/CarRepairShop/FormCar.resx
+++ b/CarRepairShop/CarRepairShop/FormCar.resx
@@ -66,13 +66,4 @@
True
-
- True
-
-
- True
-
-
- True
-
\ No newline at end of file
diff --git a/CarRepairShop/CarRepairShop/FormCarDetail.Designer.cs b/CarRepairShop/CarRepairShop/FormCarDetail.Designer.cs
index 091d553..24fbcef 100644
--- a/CarRepairShop/CarRepairShop/FormCarDetail.Designer.cs
+++ b/CarRepairShop/CarRepairShop/FormCarDetail.Designer.cs
@@ -77,6 +77,7 @@
this.ButtonSave.TabIndex = 4;
this.ButtonSave.Text = "Сохранить";
this.ButtonSave.UseVisualStyleBackColor = true;
+ this.ButtonSave.Click += new System.EventHandler(this.ButtonSave_Click);
//
// ButtonCancel
//
@@ -86,6 +87,7 @@
this.ButtonCancel.TabIndex = 5;
this.ButtonCancel.Text = "Отмена";
this.ButtonCancel.UseVisualStyleBackColor = true;
+ this.ButtonCancel.Click += new System.EventHandler(this.ButtonCancel_Click);
//
// FormCarDetail
//
diff --git a/CarRepairShop/CarRepairShop/FormCars.Designer.cs b/CarRepairShop/CarRepairShop/FormCars.Designer.cs
index 888ba58..0ed88f6 100644
--- a/CarRepairShop/CarRepairShop/FormCars.Designer.cs
+++ b/CarRepairShop/CarRepairShop/FormCars.Designer.cs
@@ -53,6 +53,7 @@
this.ButtonAdd.TabIndex = 1;
this.ButtonAdd.Text = "Добавить";
this.ButtonAdd.UseVisualStyleBackColor = true;
+ this.ButtonAdd.Click += new System.EventHandler(this.ButtonAdd_Click);
//
// ButtonUpd
//
@@ -62,6 +63,7 @@
this.ButtonUpd.TabIndex = 2;
this.ButtonUpd.Text = "Изменить";
this.ButtonUpd.UseVisualStyleBackColor = true;
+ this.ButtonUpd.Click += new System.EventHandler(this.ButtonUpd_Click);
//
// ButtonDel
//
@@ -71,6 +73,7 @@
this.ButtonDel.TabIndex = 3;
this.ButtonDel.Text = "Удалить";
this.ButtonDel.UseVisualStyleBackColor = true;
+ this.ButtonDel.Click += new System.EventHandler(this.ButtonDel_Click);
//
// ButtonRef
//
@@ -80,6 +83,7 @@
this.ButtonRef.TabIndex = 4;
this.ButtonRef.Text = "Обновить";
this.ButtonRef.UseVisualStyleBackColor = true;
+ this.ButtonRef.Click += new System.EventHandler(this.ButtonRef_Click);
//
// FormCars
//
diff --git a/CarRepairShop/CarRepairShop/FormCreateOrder.Designer.cs b/CarRepairShop/CarRepairShop/FormCreateOrder.Designer.cs
index 50b2bf0..84b16c3 100644
--- a/CarRepairShop/CarRepairShop/FormCreateOrder.Designer.cs
+++ b/CarRepairShop/CarRepairShop/FormCreateOrder.Designer.cs
@@ -45,6 +45,7 @@
this.ComboBoxCars.Name = "ComboBoxCars";
this.ComboBoxCars.Size = new System.Drawing.Size(258, 23);
this.ComboBoxCars.TabIndex = 0;
+ this.ComboBoxCars.SelectedIndexChanged += new System.EventHandler(this.ComboBoxCars_SelectedIndexChanged);
//
// labelCar
//
@@ -79,6 +80,7 @@
this.TextBoxCount.Name = "TextBoxCount";
this.TextBoxCount.Size = new System.Drawing.Size(258, 23);
this.TextBoxCount.TabIndex = 4;
+ this.TextBoxCount.TextChanged += new System.EventHandler(this.TextBoxCount_TextChanged);
//
// TextBoxSum
//
@@ -95,6 +97,7 @@
this.ButtonSave.TabIndex = 6;
this.ButtonSave.Text = "Сохранить";
this.ButtonSave.UseVisualStyleBackColor = true;
+ this.ButtonSave.Click += new System.EventHandler(this.ButtonSave_Click);
//
// ButtonCancel
//
@@ -104,6 +107,7 @@
this.ButtonCancel.TabIndex = 7;
this.ButtonCancel.Text = "Отмена";
this.ButtonCancel.UseVisualStyleBackColor = true;
+ this.ButtonCancel.Click += new System.EventHandler(this.ButtonCancel_Click);
//
// FormCreateOrder
//
@@ -120,6 +124,7 @@
this.Controls.Add(this.ComboBoxCars);
this.Name = "FormCreateOrder";
this.Text = "Создание заказа";
+ this.Load += new System.EventHandler(this.FormCreateOrder_Load);
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/CarRepairShop/CarRepairShop/FormDetail.Designer.cs b/CarRepairShop/CarRepairShop/FormDetail.Designer.cs
index df7b304..faef842 100644
--- a/CarRepairShop/CarRepairShop/FormDetail.Designer.cs
+++ b/CarRepairShop/CarRepairShop/FormDetail.Designer.cs
@@ -76,6 +76,7 @@
this.ButtonSave.TabIndex = 4;
this.ButtonSave.Text = "Сохранить";
this.ButtonSave.UseVisualStyleBackColor = true;
+ this.ButtonSave.Click += new System.EventHandler(this.ButtonSave_Click);
//
// ButtonCancel
//
@@ -85,6 +86,7 @@
this.ButtonCancel.TabIndex = 5;
this.ButtonCancel.Text = "Отмена";
this.ButtonCancel.UseVisualStyleBackColor = true;
+ this.ButtonCancel.Click += new System.EventHandler(this.ButtonCancel_Click);
//
// FormDetail
//
@@ -99,6 +101,7 @@
this.Controls.Add(this.textBoxName);
this.Name = "FormDetail";
this.Text = "Деталь";
+ this.Load += new System.EventHandler(this.FormDetail_Load);
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/CarRepairShop/CarRepairShop/FormDetails.Designer.cs b/CarRepairShop/CarRepairShop/FormDetails.Designer.cs
index 6354c94..711ba20 100644
--- a/CarRepairShop/CarRepairShop/FormDetails.Designer.cs
+++ b/CarRepairShop/CarRepairShop/FormDetails.Designer.cs
@@ -53,6 +53,7 @@
this.ButtonAdd.TabIndex = 1;
this.ButtonAdd.Text = "Добавить";
this.ButtonAdd.UseVisualStyleBackColor = true;
+ this.ButtonAdd.Click += new System.EventHandler(this.ButtonAdd_Click);
//
// ButtonUpd
//
@@ -62,6 +63,7 @@
this.ButtonUpd.TabIndex = 2;
this.ButtonUpd.Text = "Изменить";
this.ButtonUpd.UseVisualStyleBackColor = true;
+ this.ButtonUpd.Click += new System.EventHandler(this.ButtonUpd_Click);
//
// ButtonDel
//
@@ -71,6 +73,7 @@
this.ButtonDel.TabIndex = 3;
this.ButtonDel.Text = "Удалить";
this.ButtonDel.UseVisualStyleBackColor = true;
+ this.ButtonDel.Click += new System.EventHandler(this.ButtonDel_Click);
//
// ButtonRef
//
@@ -80,6 +83,7 @@
this.ButtonRef.TabIndex = 4;
this.ButtonRef.Text = "Обновить";
this.ButtonRef.UseVisualStyleBackColor = true;
+ this.ButtonRef.Click += new System.EventHandler(this.ButtonRef_Click);
//
// FormDetails
//
diff --git a/CarRepairShop/CarRepairShop/FormMain.Designer.cs b/CarRepairShop/CarRepairShop/FormMain.Designer.cs
index 91c34eb..928f1aa 100644
--- a/CarRepairShop/CarRepairShop/FormMain.Designer.cs
+++ b/CarRepairShop/CarRepairShop/FormMain.Designer.cs
@@ -59,6 +59,7 @@
this.ButtonCreateOrder.TabIndex = 1;
this.ButtonCreateOrder.Text = "Создать заказ";
this.ButtonCreateOrder.UseVisualStyleBackColor = true;
+ this.ButtonCreateOrder.Click += new System.EventHandler(this.ButtonCreateOrder_Click);
//
// ButtonTakeOrderInWork
//
@@ -68,6 +69,7 @@
this.ButtonTakeOrderInWork.TabIndex = 2;
this.ButtonTakeOrderInWork.Text = "Отдать на выполнение";
this.ButtonTakeOrderInWork.UseVisualStyleBackColor = true;
+ this.ButtonTakeOrderInWork.Click += new System.EventHandler(this.ButtonTakeOrderInWork_Click);
//
// ButtonOrderReady
//
@@ -77,6 +79,7 @@
this.ButtonOrderReady.TabIndex = 3;
this.ButtonOrderReady.Text = "Заказ готов";
this.ButtonOrderReady.UseVisualStyleBackColor = true;
+ this.ButtonOrderReady.Click += new System.EventHandler(this.ButtonOrderReady_Click);
//
// ButtonIssuedOrder
//
@@ -86,6 +89,7 @@
this.ButtonIssuedOrder.TabIndex = 4;
this.ButtonIssuedOrder.Text = "Заказ выдан";
this.ButtonIssuedOrder.UseVisualStyleBackColor = true;
+ this.ButtonIssuedOrder.Click += new System.EventHandler(this.ButtonIssuedOrder_Click);
//
// ButtonRef
//
@@ -95,6 +99,7 @@
this.ButtonRef.TabIndex = 5;
this.ButtonRef.Text = "Обновить список";
this.ButtonRef.UseVisualStyleBackColor = true;
+ this.ButtonRef.Click += new System.EventHandler(this.ButtonRef_Click);
//
// menuStrip1
//
@@ -120,12 +125,14 @@
this.ДеталиToolStripMenuItem.Name = "ДеталиToolStripMenuItem";
this.ДеталиToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
this.ДеталиToolStripMenuItem.Text = "Детали";
+ this.ДеталиToolStripMenuItem.Click += new System.EventHandler(this.ДеталиToolStripMenuItem_Click);
//
// МашиныToolStripMenuItem
//
this.МашиныToolStripMenuItem.Name = "МашиныToolStripMenuItem";
this.МашиныToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
this.МашиныToolStripMenuItem.Text = "Машины";
+ this.МашиныToolStripMenuItem.Click += new System.EventHandler(this.АвтомобилиToolStripMenuItem_Click);
//
// FormMain
//
diff --git a/CarRepairShop/CarRepairShop/FormMain.cs b/CarRepairShop/CarRepairShop/FormMain.cs
index 52c2f17..c265b95 100644
--- a/CarRepairShop/CarRepairShop/FormMain.cs
+++ b/CarRepairShop/CarRepairShop/FormMain.cs
@@ -60,7 +60,7 @@ namespace CarRepairShop
}
}
- private void КораблиToolStripMenuItem_Click(object sender, EventArgs e)
+ private void АвтомобилиToolStripMenuItem_Click(object sender, EventArgs e)
{
var service = Program.ServiceProvider?.GetService(typeof(FormCars));
if (service is FormCars form)