Исправления в форме 1

This commit is contained in:
Arklightning 2023-02-08 07:26:53 +04:00
parent cedda578ea
commit 09d271632e
9 changed files with 97 additions and 51 deletions

View File

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

View File

@ -66,13 +66,4 @@
<metadata name="Количество.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Деталь.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Количество.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@ -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
//

View File

@ -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
//

View File

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

View File

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

View File

@ -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
//

View File

@ -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
//

View File

@ -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)