diff --git a/PlumbingRepair/PlumbingRepairBusinesLogic/PlumbingRepairBusinessLogic.csproj b/PlumbingRepair/PlumbingRepairBusinesLogic/PlumbingRepairBusinessLogic.csproj index eb67220..e958b30 100644 --- a/PlumbingRepair/PlumbingRepairBusinesLogic/PlumbingRepairBusinessLogic.csproj +++ b/PlumbingRepair/PlumbingRepairBusinesLogic/PlumbingRepairBusinessLogic.csproj @@ -1,7 +1,6 @@  - Exe net6.0 enable enable diff --git a/PlumbingRepair/PlumbingRepairListImplement/PlumbingRepairListImplement.csproj b/PlumbingRepair/PlumbingRepairListImplement/PlumbingRepairListImplement.csproj index 182c1f5..05f8377 100644 --- a/PlumbingRepair/PlumbingRepairListImplement/PlumbingRepairListImplement.csproj +++ b/PlumbingRepair/PlumbingRepairListImplement/PlumbingRepairListImplement.csproj @@ -1,7 +1,6 @@ - Exe net6.0 enable enable diff --git a/PlumbingRepair/PlumbingRepairView/FormMain.cs b/PlumbingRepair/PlumbingRepairView/FormMain.cs index dfda83c..cdb5c27 100644 --- a/PlumbingRepair/PlumbingRepairView/FormMain.cs +++ b/PlumbingRepair/PlumbingRepairView/FormMain.cs @@ -119,7 +119,7 @@ namespace PlumbingRepairView try { - var operationResult = _orderLogic.FinishOrder(new OrderBindingModel + var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel { Id = id, WorkId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["WorkId"].Value), @@ -154,7 +154,8 @@ namespace PlumbingRepairView try { - var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel + + var operationResult = _orderLogic.FinishOrder(new OrderBindingModel { Id = id, WorkId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["WorkId"].Value), diff --git a/PlumbingRepair/PlumbingRepairView/FormWork.Designer.cs b/PlumbingRepair/PlumbingRepairView/FormWork.Designer.cs index d7cc42c..c1b1399 100644 --- a/PlumbingRepair/PlumbingRepairView/FormWork.Designer.cs +++ b/PlumbingRepair/PlumbingRepairView/FormWork.Designer.cs @@ -31,17 +31,18 @@ this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); 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.textBoxName = new System.Windows.Forms.TextBox(); this.textBoxCost = new System.Windows.Forms.TextBox(); - this.dataGridView = new System.Windows.Forms.DataGridView(); - this.ComponentName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Count = 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.buttonCancel = new System.Windows.Forms.Button(); this.buttonSave = new System.Windows.Forms.Button(); + this.ComponentId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ComponentName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); this.SuspendLayout(); @@ -78,6 +79,60 @@ this.groupBox1.TabStop = false; this.groupBox1.Text = "Компоненты"; // + // buttonRef + // + this.buttonRef.Location = new System.Drawing.Point(602, 206); + this.buttonRef.Name = "buttonRef"; + this.buttonRef.Size = new System.Drawing.Size(94, 29); + this.buttonRef.TabIndex = 4; + this.buttonRef.Text = "Обновить"; + this.buttonRef.UseVisualStyleBackColor = true; + this.buttonRef.Click += new System.EventHandler(this.UpdateButton_Click); + // + // buttonDel + // + this.buttonDel.Location = new System.Drawing.Point(602, 152); + this.buttonDel.Name = "buttonDel"; + this.buttonDel.Size = new System.Drawing.Size(94, 29); + this.buttonDel.TabIndex = 3; + this.buttonDel.Text = "Удалить"; + this.buttonDel.UseVisualStyleBackColor = true; + this.buttonDel.Click += new System.EventHandler(this.DeleteButton_Click); + // + // buttonUpd + // + this.buttonUpd.Location = new System.Drawing.Point(602, 98); + this.buttonUpd.Name = "buttonUpd"; + this.buttonUpd.Size = new System.Drawing.Size(94, 29); + this.buttonUpd.TabIndex = 2; + this.buttonUpd.Text = "Изменить"; + this.buttonUpd.UseVisualStyleBackColor = true; + this.buttonUpd.Click += new System.EventHandler(this.ChangeButton_Click); + // + // buttonAdd + // + this.buttonAdd.Location = new System.Drawing.Point(602, 44); + this.buttonAdd.Name = "buttonAdd"; + this.buttonAdd.Size = new System.Drawing.Size(94, 29); + this.buttonAdd.TabIndex = 1; + this.buttonAdd.Text = "Добавить"; + this.buttonAdd.UseVisualStyleBackColor = true; + this.buttonAdd.Click += new System.EventHandler(this.AddButton_Click); + // + // dataGridView + // + this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.ComponentId, + this.ComponentName, + this.Count}); + this.dataGridView.Location = new System.Drawing.Point(0, 26); + this.dataGridView.Name = "dataGridView"; + this.dataGridView.RowHeadersWidth = 51; + this.dataGridView.RowTemplate.Height = 29; + this.dataGridView.Size = new System.Drawing.Size(534, 275); + this.dataGridView.TabIndex = 0; + // // textBoxName // this.textBoxName.Location = new System.Drawing.Point(150, 10); @@ -92,18 +147,33 @@ this.textBoxCost.Size = new System.Drawing.Size(206, 27); this.textBoxCost.TabIndex = 4; // - // dataGridView + // buttonCancel // - this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.ComponentName, - this.Count}); - this.dataGridView.Location = new System.Drawing.Point(0, 26); - this.dataGridView.Name = "dataGridView"; - this.dataGridView.RowHeadersWidth = 51; - this.dataGridView.RowTemplate.Height = 29; - this.dataGridView.Size = new System.Drawing.Size(534, 275); - this.dataGridView.TabIndex = 0; + this.buttonCancel.Location = new System.Drawing.Point(634, 409); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(94, 29); + this.buttonCancel.TabIndex = 5; + this.buttonCancel.Text = "Отменить"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.ButtonCancel_Click); + // + // buttonSave + // + this.buttonSave.Location = new System.Drawing.Point(534, 409); + this.buttonSave.Name = "buttonSave"; + this.buttonSave.Size = new System.Drawing.Size(94, 29); + this.buttonSave.TabIndex = 6; + this.buttonSave.Text = "Сохранить"; + this.buttonSave.UseVisualStyleBackColor = true; + this.buttonSave.Click += new System.EventHandler(this.SaveButton_Click); + // + // ComponentId + // + this.ComponentId.HeaderText = "Id"; + this.ComponentId.MinimumWidth = 6; + this.ComponentId.Name = "ComponentId"; + this.ComponentId.Visible = false; + this.ComponentId.Width = 125; // // ComponentName // @@ -119,60 +189,6 @@ this.Count.Name = "Count"; this.Count.Width = 125; // - // buttonAdd - // - this.buttonAdd.Location = new System.Drawing.Point(602, 44); - this.buttonAdd.Name = "buttonAdd"; - this.buttonAdd.Size = new System.Drawing.Size(94, 29); - this.buttonAdd.TabIndex = 1; - this.buttonAdd.Text = "Добавить"; - this.buttonAdd.UseVisualStyleBackColor = true; - // - // buttonUpd - // - this.buttonUpd.Location = new System.Drawing.Point(602, 98); - this.buttonUpd.Name = "buttonUpd"; - this.buttonUpd.Size = new System.Drawing.Size(94, 29); - this.buttonUpd.TabIndex = 2; - this.buttonUpd.Text = "Изменить"; - this.buttonUpd.UseVisualStyleBackColor = true; - // - // buttonDel - // - this.buttonDel.Location = new System.Drawing.Point(602, 152); - this.buttonDel.Name = "buttonDel"; - this.buttonDel.Size = new System.Drawing.Size(94, 29); - this.buttonDel.TabIndex = 3; - this.buttonDel.Text = "Удалить"; - this.buttonDel.UseVisualStyleBackColor = true; - // - // buttonRef - // - this.buttonRef.Location = new System.Drawing.Point(602, 206); - this.buttonRef.Name = "buttonRef"; - this.buttonRef.Size = new System.Drawing.Size(94, 29); - this.buttonRef.TabIndex = 4; - this.buttonRef.Text = "Обновить"; - this.buttonRef.UseVisualStyleBackColor = true; - // - // buttonCancel - // - this.buttonCancel.Location = new System.Drawing.Point(634, 409); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(94, 29); - this.buttonCancel.TabIndex = 5; - this.buttonCancel.Text = "Отменить"; - this.buttonCancel.UseVisualStyleBackColor = true; - // - // buttonSave - // - this.buttonSave.Location = new System.Drawing.Point(534, 409); - this.buttonSave.Name = "buttonSave"; - this.buttonSave.Size = new System.Drawing.Size(94, 29); - this.buttonSave.TabIndex = 6; - this.buttonSave.Text = "Сохранить"; - this.buttonSave.UseVisualStyleBackColor = true; - // // FormWork // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); @@ -206,9 +222,10 @@ private Button buttonDel; private Button buttonUpd; private Button buttonAdd; - private DataGridViewTextBoxColumn ComponentName; - private DataGridViewTextBoxColumn Count; private Button buttonCancel; private Button buttonSave; + private DataGridViewTextBoxColumn ComponentId; + private DataGridViewTextBoxColumn ComponentName; + private DataGridViewTextBoxColumn Count; } } \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairView/FormWork.resx b/PlumbingRepair/PlumbingRepairView/FormWork.resx index c8736c9..9fb07e6 100644 --- a/PlumbingRepair/PlumbingRepairView/FormWork.resx +++ b/PlumbingRepair/PlumbingRepairView/FormWork.resx @@ -57,10 +57,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - + True diff --git a/PlumbingRepair/PlumbingRepairView/FormWorks.Designer.cs b/PlumbingRepair/PlumbingRepairView/FormWorks.Designer.cs index f9bd26d..5231cdb 100644 --- a/PlumbingRepair/PlumbingRepairView/FormWorks.Designer.cs +++ b/PlumbingRepair/PlumbingRepairView/FormWorks.Designer.cs @@ -54,6 +54,7 @@ this.buttonAdd.TabIndex = 1; this.buttonAdd.Text = "Добавить"; this.buttonAdd.UseVisualStyleBackColor = true; + this.buttonAdd.Click += new System.EventHandler(this.AddButton_Click); // // buttonUpd // @@ -63,6 +64,7 @@ this.buttonUpd.TabIndex = 2; this.buttonUpd.Text = "Изменить"; this.buttonUpd.UseVisualStyleBackColor = true; + this.buttonUpd.Click += new System.EventHandler(this.ChangeButton_Click); // // buttonDel // @@ -72,6 +74,7 @@ this.buttonDel.TabIndex = 3; this.buttonDel.Text = "Удалить"; this.buttonDel.UseVisualStyleBackColor = true; + this.buttonDel.Click += new System.EventHandler(this.DeleteButton_Click); // // buttonRef // @@ -81,6 +84,7 @@ this.buttonRef.TabIndex = 4; this.buttonRef.Text = "Обновить"; this.buttonRef.UseVisualStyleBackColor = true; + this.buttonRef.Click += new System.EventHandler(this.UpdateButton_Click); // // FormWorks // diff --git a/PlumbingRepair/PlumbingRepairView/Program.cs b/PlumbingRepair/PlumbingRepairView/Program.cs index a783f0a..14d3f5a 100644 --- a/PlumbingRepair/PlumbingRepairView/Program.cs +++ b/PlumbingRepair/PlumbingRepairView/Program.cs @@ -48,7 +48,7 @@ namespace PlumbingRepairView services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); + services.AddTransient(); } } } \ No newline at end of file