фиксы из 4 лабы(датагридвью, неправильнооткрывающаяся формочка)

This commit is contained in:
Timourka 2024-05-08 00:29:38 +04:00
commit c22035dc50
5 changed files with 686 additions and 678 deletions

View File

@ -20,162 +20,164 @@
base.Dispose(disposing);
}
#region Windows Form Designer generated code
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
buttonDelete = new Button();
buttonUpdate = new Button();
buttonCreate = new Button();
textBoxName = new TextBox();
label4 = new Label();
label3 = new Label();
label2 = new Label();
label1 = new Label();
dataGridView = new DataGridView();
textBoxAddress = new TextBox();
textBoxPhone = new TextBox();
textBoxWorkingHours = new TextBox();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
//
// buttonDelete
//
buttonDelete.Location = new Point(688, 214);
buttonDelete.Name = "buttonDelete";
buttonDelete.Size = new Size(75, 23);
buttonDelete.TabIndex = 28;
buttonDelete.Text = "delete";
buttonDelete.UseVisualStyleBackColor = true;
buttonDelete.Click += buttonDelete_Click;
//
// buttonUpdate
//
buttonUpdate.Location = new Point(688, 185);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(75, 23);
buttonUpdate.TabIndex = 27;
buttonUpdate.Text = "update";
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += buttonUpdate_Click;
//
// buttonCreate
//
buttonCreate.Location = new Point(688, 156);
buttonCreate.Name = "buttonCreate";
buttonCreate.Size = new Size(75, 23);
buttonCreate.TabIndex = 26;
buttonCreate.Text = "create";
buttonCreate.UseVisualStyleBackColor = true;
buttonCreate.Click += buttonCreate_Click;
//
// textBoxName
//
textBoxName.Location = new Point(688, 11);
textBoxName.Name = "textBoxName";
textBoxName.Size = new Size(100, 23);
textBoxName.TabIndex = 21;
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(598, 101);
label4.Name = "label4";
label4.Size = new Size(84, 15);
label4.TabIndex = 19;
label4.Text = "WorkingHours";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(598, 72);
label3.Name = "label3";
label3.Size = new Size(41, 15);
label3.TabIndex = 18;
label3.Text = "Phone";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(598, 43);
label2.Name = "label2";
label2.Size = new Size(49, 15);
label2.TabIndex = 17;
label2.Text = "Address";
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(598, 14);
label1.Name = "label1";
label1.Size = new Size(39, 15);
label1.TabIndex = 16;
label1.Text = "Name";
//
// dataGridView
//
dataGridView.AllowUserToAddRows = false;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Location = new Point(13, 14);
dataGridView.Name = "dataGridView";
dataGridView.RowTemplate.Height = 25;
dataGridView.Size = new Size(579, 426);
dataGridView.TabIndex = 15;
dataGridView.CellClick += dataGridView_CellClick;
//
// textBoxAddress
//
textBoxAddress.Location = new Point(688, 40);
textBoxAddress.Name = "textBoxAddress";
textBoxAddress.Size = new Size(100, 23);
textBoxAddress.TabIndex = 29;
//
// textBoxPhone
//
textBoxPhone.Location = new Point(688, 69);
textBoxPhone.Name = "textBoxPhone";
textBoxPhone.Size = new Size(100, 23);
textBoxPhone.TabIndex = 30;
//
// textBoxWorkingHours
//
textBoxWorkingHours.Location = new Point(688, 98);
textBoxWorkingHours.Name = "textBoxWorkingHours";
textBoxWorkingHours.Size = new Size(100, 23);
textBoxWorkingHours.TabIndex = 31;
//
// FormBranch
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(textBoxWorkingHours);
Controls.Add(textBoxPhone);
Controls.Add(textBoxAddress);
Controls.Add(buttonDelete);
Controls.Add(buttonUpdate);
Controls.Add(buttonCreate);
Controls.Add(textBoxName);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(dataGridView);
Name = "FormBranch";
Text = "FormBranch";
Load += FormBranch_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);
PerformLayout();
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
buttonDelete = new Button();
buttonUpdate = new Button();
buttonCreate = new Button();
textBoxName = new TextBox();
label4 = new Label();
label3 = new Label();
label2 = new Label();
label1 = new Label();
dataGridView = new DataGridView();
textBoxAddress = new TextBox();
textBoxPhone = new TextBox();
textBoxWorkingHours = new TextBox();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
//
// buttonDelete
//
buttonDelete.Location = new Point(688, 214);
buttonDelete.Name = "buttonDelete";
buttonDelete.Size = new Size(75, 23);
buttonDelete.TabIndex = 28;
buttonDelete.Text = "delete";
buttonDelete.UseVisualStyleBackColor = true;
buttonDelete.Click += buttonDelete_Click;
//
// buttonUpdate
//
buttonUpdate.Location = new Point(688, 185);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(75, 23);
buttonUpdate.TabIndex = 27;
buttonUpdate.Text = "update";
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += buttonUpdate_Click;
//
// buttonCreate
//
buttonCreate.Location = new Point(688, 156);
buttonCreate.Name = "buttonCreate";
buttonCreate.Size = new Size(75, 23);
buttonCreate.TabIndex = 26;
buttonCreate.Text = "create";
buttonCreate.UseVisualStyleBackColor = true;
buttonCreate.Click += buttonCreate_Click;
//
// textBoxName
//
textBoxName.Location = new Point(688, 11);
textBoxName.Name = "textBoxName";
textBoxName.Size = new Size(100, 23);
textBoxName.TabIndex = 21;
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(598, 101);
label4.Name = "label4";
label4.Size = new Size(84, 15);
label4.TabIndex = 19;
label4.Text = "WorkingHours";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(598, 72);
label3.Name = "label3";
label3.Size = new Size(41, 15);
label3.TabIndex = 18;
label3.Text = "Phone";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(598, 43);
label2.Name = "label2";
label2.Size = new Size(49, 15);
label2.TabIndex = 17;
label2.Text = "Address";
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(598, 14);
label1.Name = "label1";
label1.Size = new Size(39, 15);
label1.TabIndex = 16;
label1.Text = "Name";
//
// dataGridView
//
dataGridView.AllowUserToAddRows = false;
dataGridView.AllowUserToDeleteRows = false;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Location = new Point(13, 14);
dataGridView.Name = "dataGridView";
dataGridView.ReadOnly = true;
dataGridView.RowTemplate.Height = 25;
dataGridView.Size = new Size(579, 426);
dataGridView.TabIndex = 15;
dataGridView.CellClick += dataGridView_CellClick;
//
// textBoxAddress
//
textBoxAddress.Location = new Point(688, 40);
textBoxAddress.Name = "textBoxAddress";
textBoxAddress.Size = new Size(100, 23);
textBoxAddress.TabIndex = 29;
//
// textBoxPhone
//
textBoxPhone.Location = new Point(688, 69);
textBoxPhone.Name = "textBoxPhone";
textBoxPhone.Size = new Size(100, 23);
textBoxPhone.TabIndex = 30;
//
// textBoxWorkingHours
//
textBoxWorkingHours.Location = new Point(688, 98);
textBoxWorkingHours.Name = "textBoxWorkingHours";
textBoxWorkingHours.Size = new Size(100, 23);
textBoxWorkingHours.TabIndex = 31;
//
// FormBranch
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(textBoxWorkingHours);
Controls.Add(textBoxPhone);
Controls.Add(textBoxAddress);
Controls.Add(buttonDelete);
Controls.Add(buttonUpdate);
Controls.Add(buttonCreate);
Controls.Add(textBoxName);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(dataGridView);
Name = "FormBranch";
Text = "FormBranch";
Load += FormBranch_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
#endregion
private Button buttonDelete;
private Button buttonDelete;
private Button buttonUpdate;
private Button buttonCreate;
private ComboBox comboBoxBodyType;

View File

@ -20,185 +20,187 @@
base.Dispose(disposing);
}
#region Windows Form Designer generated code
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
buttonDelete = new Button();
buttonUpdate = new Button();
buttonCreate = new Button();
comboBoxModel = new ComboBox();
textBoxYear = new TextBox();
textBoxMileage = new TextBox();
label5 = new Label();
label4 = new Label();
label3 = new Label();
label2 = new Label();
label1 = new Label();
dataGridView = new DataGridView();
comboBoxBranch = new ComboBox();
comboBoxStatus = new ComboBox();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
//
// buttonDelete
//
buttonDelete.Location = new Point(688, 214);
buttonDelete.Name = "buttonDelete";
buttonDelete.Size = new Size(75, 23);
buttonDelete.TabIndex = 28;
buttonDelete.Text = "delete";
buttonDelete.UseVisualStyleBackColor = true;
buttonDelete.Click += buttonDelete_Click;
//
// buttonUpdate
//
buttonUpdate.Location = new Point(688, 185);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(75, 23);
buttonUpdate.TabIndex = 27;
buttonUpdate.Text = "update";
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += buttonUpdate_Click;
//
// buttonCreate
//
buttonCreate.Location = new Point(688, 156);
buttonCreate.Name = "buttonCreate";
buttonCreate.Size = new Size(75, 23);
buttonCreate.TabIndex = 26;
buttonCreate.Text = "create";
buttonCreate.UseVisualStyleBackColor = true;
buttonCreate.Click += buttonCreate_Click;
//
// comboBoxModel
//
comboBoxModel.FormattingEnabled = true;
comboBoxModel.Location = new Point(688, 11);
comboBoxModel.Name = "comboBoxModel";
comboBoxModel.Size = new Size(100, 23);
comboBoxModel.TabIndex = 25;
//
// textBoxYear
//
textBoxYear.Location = new Point(688, 69);
textBoxYear.Name = "textBoxYear";
textBoxYear.Size = new Size(100, 23);
textBoxYear.TabIndex = 23;
//
// textBoxMileage
//
textBoxMileage.Location = new Point(688, 98);
textBoxMileage.Name = "textBoxMileage";
textBoxMileage.Size = new Size(100, 23);
textBoxMileage.TabIndex = 21;
//
// label5
//
label5.AutoSize = true;
label5.Location = new Point(622, 130);
label5.Name = "label5";
label5.Size = new Size(39, 15);
label5.TabIndex = 20;
label5.Text = "Status";
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(622, 101);
label4.Name = "label4";
label4.Size = new Size(49, 15);
label4.TabIndex = 19;
label4.Text = "Mileage";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(622, 72);
label3.Name = "label3";
label3.Size = new Size(29, 15);
label3.TabIndex = 18;
label3.Text = "Year";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(622, 43);
label2.Name = "label2";
label2.Size = new Size(44, 15);
label2.TabIndex = 17;
label2.Text = "Branch";
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(622, 14);
label1.Name = "label1";
label1.Size = new Size(41, 15);
label1.TabIndex = 16;
label1.Text = "Model";
//
// dataGridView
//
dataGridView.AllowUserToAddRows = false;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Location = new Point(13, 14);
dataGridView.Name = "dataGridView";
dataGridView.RowTemplate.Height = 25;
dataGridView.Size = new Size(603, 426);
dataGridView.TabIndex = 15;
dataGridView.CellClick += dataGridView_CellClick;
//
// comboBoxBranch
//
comboBoxBranch.FormattingEnabled = true;
comboBoxBranch.Location = new Point(688, 40);
comboBoxBranch.Name = "comboBoxBranch";
comboBoxBranch.Size = new Size(100, 23);
comboBoxBranch.TabIndex = 29;
//
// comboBoxStatus
//
comboBoxStatus.FormattingEnabled = true;
comboBoxStatus.Location = new Point(688, 127);
comboBoxStatus.Name = "comboBoxStatus";
comboBoxStatus.Size = new Size(100, 23);
comboBoxStatus.TabIndex = 30;
//
// FormCar
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(comboBoxStatus);
Controls.Add(comboBoxBranch);
Controls.Add(buttonDelete);
Controls.Add(buttonUpdate);
Controls.Add(buttonCreate);
Controls.Add(comboBoxModel);
Controls.Add(textBoxYear);
Controls.Add(textBoxMileage);
Controls.Add(label5);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(dataGridView);
Name = "FormCar";
Text = "FormCar";
Load += FormCar_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);
PerformLayout();
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
buttonDelete = new Button();
buttonUpdate = new Button();
buttonCreate = new Button();
comboBoxModel = new ComboBox();
textBoxYear = new TextBox();
textBoxMileage = new TextBox();
label5 = new Label();
label4 = new Label();
label3 = new Label();
label2 = new Label();
label1 = new Label();
dataGridView = new DataGridView();
comboBoxBranch = new ComboBox();
comboBoxStatus = new ComboBox();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
//
// buttonDelete
//
buttonDelete.Location = new Point(688, 214);
buttonDelete.Name = "buttonDelete";
buttonDelete.Size = new Size(75, 23);
buttonDelete.TabIndex = 28;
buttonDelete.Text = "delete";
buttonDelete.UseVisualStyleBackColor = true;
buttonDelete.Click += buttonDelete_Click;
//
// buttonUpdate
//
buttonUpdate.Location = new Point(688, 185);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(75, 23);
buttonUpdate.TabIndex = 27;
buttonUpdate.Text = "update";
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += buttonUpdate_Click;
//
// buttonCreate
//
buttonCreate.Location = new Point(688, 156);
buttonCreate.Name = "buttonCreate";
buttonCreate.Size = new Size(75, 23);
buttonCreate.TabIndex = 26;
buttonCreate.Text = "create";
buttonCreate.UseVisualStyleBackColor = true;
buttonCreate.Click += buttonCreate_Click;
//
// comboBoxModel
//
comboBoxModel.FormattingEnabled = true;
comboBoxModel.Location = new Point(688, 11);
comboBoxModel.Name = "comboBoxModel";
comboBoxModel.Size = new Size(100, 23);
comboBoxModel.TabIndex = 25;
//
// textBoxYear
//
textBoxYear.Location = new Point(688, 69);
textBoxYear.Name = "textBoxYear";
textBoxYear.Size = new Size(100, 23);
textBoxYear.TabIndex = 23;
//
// textBoxMileage
//
textBoxMileage.Location = new Point(688, 98);
textBoxMileage.Name = "textBoxMileage";
textBoxMileage.Size = new Size(100, 23);
textBoxMileage.TabIndex = 21;
//
// label5
//
label5.AutoSize = true;
label5.Location = new Point(622, 130);
label5.Name = "label5";
label5.Size = new Size(39, 15);
label5.TabIndex = 20;
label5.Text = "Status";
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(622, 101);
label4.Name = "label4";
label4.Size = new Size(49, 15);
label4.TabIndex = 19;
label4.Text = "Mileage";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(622, 72);
label3.Name = "label3";
label3.Size = new Size(29, 15);
label3.TabIndex = 18;
label3.Text = "Year";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(622, 43);
label2.Name = "label2";
label2.Size = new Size(44, 15);
label2.TabIndex = 17;
label2.Text = "Branch";
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(622, 14);
label1.Name = "label1";
label1.Size = new Size(41, 15);
label1.TabIndex = 16;
label1.Text = "Model";
//
// dataGridView
//
dataGridView.AllowUserToAddRows = false;
dataGridView.AllowUserToDeleteRows = false;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Location = new Point(13, 14);
dataGridView.Name = "dataGridView";
dataGridView.ReadOnly = true;
dataGridView.RowTemplate.Height = 25;
dataGridView.Size = new Size(603, 426);
dataGridView.TabIndex = 15;
dataGridView.CellClick += dataGridView_CellClick;
//
// comboBoxBranch
//
comboBoxBranch.FormattingEnabled = true;
comboBoxBranch.Location = new Point(688, 40);
comboBoxBranch.Name = "comboBoxBranch";
comboBoxBranch.Size = new Size(100, 23);
comboBoxBranch.TabIndex = 29;
//
// comboBoxStatus
//
comboBoxStatus.FormattingEnabled = true;
comboBoxStatus.Location = new Point(688, 127);
comboBoxStatus.Name = "comboBoxStatus";
comboBoxStatus.Size = new Size(100, 23);
comboBoxStatus.TabIndex = 30;
//
// FormCar
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(comboBoxStatus);
Controls.Add(comboBoxBranch);
Controls.Add(buttonDelete);
Controls.Add(buttonUpdate);
Controls.Add(buttonCreate);
Controls.Add(comboBoxModel);
Controls.Add(textBoxYear);
Controls.Add(textBoxMileage);
Controls.Add(label5);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(dataGridView);
Name = "FormCar";
Text = "FormCar";
Load += FormCar_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
#endregion
private Button buttonDelete;
private Button buttonDelete;
private Button buttonUpdate;
private Button buttonCreate;
private ComboBox comboBoxModel;

View File

@ -20,183 +20,185 @@
base.Dispose(disposing);
}
#region Windows Form Designer generated code
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
dataGridView = new DataGridView();
label1 = new Label();
label2 = new Label();
label3 = new Label();
label4 = new Label();
label5 = new Label();
textBoxBrand = new TextBox();
textBoxModel = new TextBox();
textBoxYear = new TextBox();
textBoxSeats = new TextBox();
comboBoxBodyType = new ComboBox();
buttonCreate = new Button();
buttonUpdate = new Button();
buttonDelete = new Button();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
//
// dataGridView
//
dataGridView.AllowUserToAddRows = false;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Location = new Point(12, 12);
dataGridView.Name = "dataGridView";
dataGridView.RowTemplate.Height = 25;
dataGridView.Size = new Size(603, 426);
dataGridView.TabIndex = 0;
dataGridView.CellClick += dataGridView_CellClick;
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(621, 12);
label1.Name = "label1";
label1.Size = new Size(38, 15);
label1.TabIndex = 1;
label1.Text = "Brand";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(621, 41);
label2.Name = "label2";
label2.Size = new Size(41, 15);
label2.TabIndex = 2;
label2.Text = "Model";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(621, 70);
label3.Name = "label3";
label3.Size = new Size(29, 15);
label3.TabIndex = 3;
label3.Text = "Year";
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(621, 99);
label4.Name = "label4";
label4.Size = new Size(60, 15);
label4.TabIndex = 4;
label4.Text = "Body type";
//
// label5
//
label5.AutoSize = true;
label5.Location = new Point(621, 128);
label5.Name = "label5";
label5.Size = new Size(34, 15);
label5.TabIndex = 5;
label5.Text = "Seats";
//
// textBoxBrand
//
textBoxBrand.Location = new Point(687, 9);
textBoxBrand.Name = "textBoxBrand";
textBoxBrand.Size = new Size(100, 23);
textBoxBrand.TabIndex = 6;
//
// textBoxModel
//
textBoxModel.Location = new Point(687, 38);
textBoxModel.Name = "textBoxModel";
textBoxModel.Size = new Size(100, 23);
textBoxModel.TabIndex = 7;
//
// textBoxYear
//
textBoxYear.Location = new Point(687, 67);
textBoxYear.Name = "textBoxYear";
textBoxYear.Size = new Size(100, 23);
textBoxYear.TabIndex = 8;
//
// textBoxSeats
//
textBoxSeats.Location = new Point(687, 125);
textBoxSeats.Name = "textBoxSeats";
textBoxSeats.Size = new Size(100, 23);
textBoxSeats.TabIndex = 10;
//
// comboBoxBodyType
//
comboBoxBodyType.FormattingEnabled = true;
comboBoxBodyType.Location = new Point(687, 96);
comboBoxBodyType.Name = "comboBoxBodyType";
comboBoxBodyType.Size = new Size(100, 23);
comboBoxBodyType.TabIndex = 11;
//
// buttonCreate
//
buttonCreate.Location = new Point(687, 154);
buttonCreate.Name = "buttonCreate";
buttonCreate.Size = new Size(75, 23);
buttonCreate.TabIndex = 12;
buttonCreate.Text = "create";
buttonCreate.UseVisualStyleBackColor = true;
buttonCreate.Click += buttonCreate_Click;
//
// buttonUpdate
//
buttonUpdate.Location = new Point(687, 183);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(75, 23);
buttonUpdate.TabIndex = 13;
buttonUpdate.Text = "update";
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += buttonUpdate_Click;
//
// buttonDelete
//
buttonDelete.Location = new Point(687, 212);
buttonDelete.Name = "buttonDelete";
buttonDelete.Size = new Size(75, 23);
buttonDelete.TabIndex = 14;
buttonDelete.Text = "delete";
buttonDelete.UseVisualStyleBackColor = true;
buttonDelete.Click += buttonDelete_Click;
//
// FormCarModel
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(buttonDelete);
Controls.Add(buttonUpdate);
Controls.Add(buttonCreate);
Controls.Add(comboBoxBodyType);
Controls.Add(textBoxSeats);
Controls.Add(textBoxYear);
Controls.Add(textBoxModel);
Controls.Add(textBoxBrand);
Controls.Add(label5);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(dataGridView);
Name = "FormCarModel";
Text = "FormCarModel";
Load += FormCarModel_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);
PerformLayout();
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
dataGridView = new DataGridView();
label1 = new Label();
label2 = new Label();
label3 = new Label();
label4 = new Label();
label5 = new Label();
textBoxBrand = new TextBox();
textBoxModel = new TextBox();
textBoxYear = new TextBox();
textBoxSeats = new TextBox();
comboBoxBodyType = new ComboBox();
buttonCreate = new Button();
buttonUpdate = new Button();
buttonDelete = new Button();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
//
// dataGridView
//
dataGridView.AllowUserToAddRows = false;
dataGridView.AllowUserToDeleteRows = false;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Location = new Point(12, 12);
dataGridView.Name = "dataGridView";
dataGridView.ReadOnly = true;
dataGridView.RowTemplate.Height = 25;
dataGridView.Size = new Size(603, 426);
dataGridView.TabIndex = 0;
dataGridView.CellClick += dataGridView_CellClick;
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(621, 12);
label1.Name = "label1";
label1.Size = new Size(38, 15);
label1.TabIndex = 1;
label1.Text = "Brand";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(621, 41);
label2.Name = "label2";
label2.Size = new Size(41, 15);
label2.TabIndex = 2;
label2.Text = "Model";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(621, 70);
label3.Name = "label3";
label3.Size = new Size(29, 15);
label3.TabIndex = 3;
label3.Text = "Year";
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(621, 99);
label4.Name = "label4";
label4.Size = new Size(60, 15);
label4.TabIndex = 4;
label4.Text = "Body type";
//
// label5
//
label5.AutoSize = true;
label5.Location = new Point(621, 128);
label5.Name = "label5";
label5.Size = new Size(34, 15);
label5.TabIndex = 5;
label5.Text = "Seats";
//
// textBoxBrand
//
textBoxBrand.Location = new Point(687, 9);
textBoxBrand.Name = "textBoxBrand";
textBoxBrand.Size = new Size(100, 23);
textBoxBrand.TabIndex = 6;
//
// textBoxModel
//
textBoxModel.Location = new Point(687, 38);
textBoxModel.Name = "textBoxModel";
textBoxModel.Size = new Size(100, 23);
textBoxModel.TabIndex = 7;
//
// textBoxYear
//
textBoxYear.Location = new Point(687, 67);
textBoxYear.Name = "textBoxYear";
textBoxYear.Size = new Size(100, 23);
textBoxYear.TabIndex = 8;
//
// textBoxSeats
//
textBoxSeats.Location = new Point(687, 125);
textBoxSeats.Name = "textBoxSeats";
textBoxSeats.Size = new Size(100, 23);
textBoxSeats.TabIndex = 10;
//
// comboBoxBodyType
//
comboBoxBodyType.FormattingEnabled = true;
comboBoxBodyType.Location = new Point(687, 96);
comboBoxBodyType.Name = "comboBoxBodyType";
comboBoxBodyType.Size = new Size(100, 23);
comboBoxBodyType.TabIndex = 11;
//
// buttonCreate
//
buttonCreate.Location = new Point(687, 154);
buttonCreate.Name = "buttonCreate";
buttonCreate.Size = new Size(75, 23);
buttonCreate.TabIndex = 12;
buttonCreate.Text = "create";
buttonCreate.UseVisualStyleBackColor = true;
buttonCreate.Click += buttonCreate_Click;
//
// buttonUpdate
//
buttonUpdate.Location = new Point(687, 183);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(75, 23);
buttonUpdate.TabIndex = 13;
buttonUpdate.Text = "update";
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += buttonUpdate_Click;
//
// buttonDelete
//
buttonDelete.Location = new Point(687, 212);
buttonDelete.Name = "buttonDelete";
buttonDelete.Size = new Size(75, 23);
buttonDelete.TabIndex = 14;
buttonDelete.Text = "delete";
buttonDelete.UseVisualStyleBackColor = true;
buttonDelete.Click += buttonDelete_Click;
//
// FormCarModel
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(buttonDelete);
Controls.Add(buttonUpdate);
Controls.Add(buttonCreate);
Controls.Add(comboBoxBodyType);
Controls.Add(textBoxSeats);
Controls.Add(textBoxYear);
Controls.Add(textBoxModel);
Controls.Add(textBoxBrand);
Controls.Add(label5);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(dataGridView);
Name = "FormCarModel";
Text = "FormCarModel";
Load += FormCarModel_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
#endregion
private DataGridView dataGridView;
private DataGridView dataGridView;
private Label label1;
private Label label2;
private Label label3;

View File

@ -20,182 +20,184 @@
base.Dispose(disposing);
}
#region Windows Form Designer generated code
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
buttonDelete = new Button();
buttonUpdate = new Button();
buttonCreate = new Button();
textBoxEmail = new TextBox();
textBoxAddress = new TextBox();
textBoxSurname = new TextBox();
textBoxName = new TextBox();
label5 = new Label();
label4 = new Label();
label3 = new Label();
label2 = new Label();
label1 = new Label();
dataGridView = new DataGridView();
textBoxPhone = new TextBox();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
//
// buttonDelete
//
buttonDelete.Location = new Point(688, 214);
buttonDelete.Name = "buttonDelete";
buttonDelete.Size = new Size(75, 23);
buttonDelete.TabIndex = 28;
buttonDelete.Text = "delete";
buttonDelete.UseVisualStyleBackColor = true;
buttonDelete.Click += buttonDelete_Click;
//
// buttonUpdate
//
buttonUpdate.Location = new Point(688, 185);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(75, 23);
buttonUpdate.TabIndex = 27;
buttonUpdate.Text = "update";
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += buttonUpdate_Click;
//
// buttonCreate
//
buttonCreate.Location = new Point(688, 156);
buttonCreate.Name = "buttonCreate";
buttonCreate.Size = new Size(75, 23);
buttonCreate.TabIndex = 26;
buttonCreate.Text = "create";
buttonCreate.UseVisualStyleBackColor = true;
buttonCreate.Click += buttonCreate_Click;
//
// textBoxEmail
//
textBoxEmail.Location = new Point(688, 127);
textBoxEmail.Name = "textBoxEmail";
textBoxEmail.Size = new Size(100, 23);
textBoxEmail.TabIndex = 24;
//
// textBoxAddress
//
textBoxAddress.Location = new Point(688, 69);
textBoxAddress.Name = "textBoxAddress";
textBoxAddress.Size = new Size(100, 23);
textBoxAddress.TabIndex = 23;
//
// textBoxSurname
//
textBoxSurname.Location = new Point(688, 40);
textBoxSurname.Name = "textBoxSurname";
textBoxSurname.Size = new Size(100, 23);
textBoxSurname.TabIndex = 22;
//
// textBoxName
//
textBoxName.Location = new Point(688, 11);
textBoxName.Name = "textBoxName";
textBoxName.Size = new Size(100, 23);
textBoxName.TabIndex = 21;
//
// label5
//
label5.AutoSize = true;
label5.Location = new Point(622, 130);
label5.Name = "label5";
label5.Size = new Size(36, 15);
label5.TabIndex = 20;
label5.Text = "Email";
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(622, 101);
label4.Name = "label4";
label4.Size = new Size(41, 15);
label4.TabIndex = 19;
label4.Text = "Phone";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(622, 72);
label3.Name = "label3";
label3.Size = new Size(49, 15);
label3.TabIndex = 18;
label3.Text = "Address";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(622, 43);
label2.Name = "label2";
label2.Size = new Size(54, 15);
label2.TabIndex = 17;
label2.Text = "Surname";
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(622, 14);
label1.Name = "label1";
label1.Size = new Size(39, 15);
label1.TabIndex = 16;
label1.Text = "Name";
//
// dataGridView
//
dataGridView.AllowUserToAddRows = false;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Location = new Point(13, 14);
dataGridView.Name = "dataGridView";
dataGridView.RowTemplate.Height = 25;
dataGridView.Size = new Size(603, 426);
dataGridView.TabIndex = 15;
dataGridView.CellClick += dataGridView_CellClick;
//
// textBoxPhone
//
textBoxPhone.Location = new Point(688, 98);
textBoxPhone.Name = "textBoxPhone";
textBoxPhone.Size = new Size(100, 23);
textBoxPhone.TabIndex = 29;
//
// FormClient
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(textBoxPhone);
Controls.Add(buttonDelete);
Controls.Add(buttonUpdate);
Controls.Add(buttonCreate);
Controls.Add(textBoxEmail);
Controls.Add(textBoxAddress);
Controls.Add(textBoxSurname);
Controls.Add(textBoxName);
Controls.Add(label5);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(dataGridView);
Name = "FormClient";
Text = "FormClient";
Load += FormClient_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);
PerformLayout();
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
buttonDelete = new Button();
buttonUpdate = new Button();
buttonCreate = new Button();
textBoxEmail = new TextBox();
textBoxAddress = new TextBox();
textBoxSurname = new TextBox();
textBoxName = new TextBox();
label5 = new Label();
label4 = new Label();
label3 = new Label();
label2 = new Label();
label1 = new Label();
dataGridView = new DataGridView();
textBoxPhone = new TextBox();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
//
// buttonDelete
//
buttonDelete.Location = new Point(688, 214);
buttonDelete.Name = "buttonDelete";
buttonDelete.Size = new Size(75, 23);
buttonDelete.TabIndex = 28;
buttonDelete.Text = "delete";
buttonDelete.UseVisualStyleBackColor = true;
buttonDelete.Click += buttonDelete_Click;
//
// buttonUpdate
//
buttonUpdate.Location = new Point(688, 185);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(75, 23);
buttonUpdate.TabIndex = 27;
buttonUpdate.Text = "update";
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += buttonUpdate_Click;
//
// buttonCreate
//
buttonCreate.Location = new Point(688, 156);
buttonCreate.Name = "buttonCreate";
buttonCreate.Size = new Size(75, 23);
buttonCreate.TabIndex = 26;
buttonCreate.Text = "create";
buttonCreate.UseVisualStyleBackColor = true;
buttonCreate.Click += buttonCreate_Click;
//
// textBoxEmail
//
textBoxEmail.Location = new Point(688, 127);
textBoxEmail.Name = "textBoxEmail";
textBoxEmail.Size = new Size(100, 23);
textBoxEmail.TabIndex = 24;
//
// textBoxAddress
//
textBoxAddress.Location = new Point(688, 69);
textBoxAddress.Name = "textBoxAddress";
textBoxAddress.Size = new Size(100, 23);
textBoxAddress.TabIndex = 23;
//
// textBoxSurname
//
textBoxSurname.Location = new Point(688, 40);
textBoxSurname.Name = "textBoxSurname";
textBoxSurname.Size = new Size(100, 23);
textBoxSurname.TabIndex = 22;
//
// textBoxName
//
textBoxName.Location = new Point(688, 11);
textBoxName.Name = "textBoxName";
textBoxName.Size = new Size(100, 23);
textBoxName.TabIndex = 21;
//
// label5
//
label5.AutoSize = true;
label5.Location = new Point(622, 130);
label5.Name = "label5";
label5.Size = new Size(36, 15);
label5.TabIndex = 20;
label5.Text = "Email";
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(622, 101);
label4.Name = "label4";
label4.Size = new Size(41, 15);
label4.TabIndex = 19;
label4.Text = "Phone";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(622, 72);
label3.Name = "label3";
label3.Size = new Size(49, 15);
label3.TabIndex = 18;
label3.Text = "Address";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(622, 43);
label2.Name = "label2";
label2.Size = new Size(54, 15);
label2.TabIndex = 17;
label2.Text = "Surname";
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(622, 14);
label1.Name = "label1";
label1.Size = new Size(39, 15);
label1.TabIndex = 16;
label1.Text = "Name";
//
// dataGridView
//
dataGridView.AllowUserToAddRows = false;
dataGridView.AllowUserToDeleteRows = false;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Location = new Point(13, 14);
dataGridView.Name = "dataGridView";
dataGridView.ReadOnly = true;
dataGridView.RowTemplate.Height = 25;
dataGridView.Size = new Size(603, 426);
dataGridView.TabIndex = 15;
dataGridView.CellClick += dataGridView_CellClick;
//
// textBoxPhone
//
textBoxPhone.Location = new Point(688, 98);
textBoxPhone.Name = "textBoxPhone";
textBoxPhone.Size = new Size(100, 23);
textBoxPhone.TabIndex = 29;
//
// FormClient
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(textBoxPhone);
Controls.Add(buttonDelete);
Controls.Add(buttonUpdate);
Controls.Add(buttonCreate);
Controls.Add(textBoxEmail);
Controls.Add(textBoxAddress);
Controls.Add(textBoxSurname);
Controls.Add(textBoxName);
Controls.Add(label5);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(dataGridView);
Name = "FormClient";
Text = "FormClient";
Load += FormClient_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
#endregion
private Button buttonDelete;
private Button buttonDelete;
private Button buttonUpdate;
private Button buttonCreate;
private TextBox textBoxEmail;

View File

@ -39,8 +39,8 @@ namespace Forms
private void clientToolStripMenuItem_Click(object sender, EventArgs e)
{
var service = Program.ServiceProvider?.GetService(typeof(FormBranch));
if (service is FormBranch form)
var service = Program.ServiceProvider?.GetService(typeof(FormClient));
if (service is FormClient form)
{
form.ShowDialog();
}