diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormComponent.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormComponent.cs index acc9caf..c742080 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormComponent.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormComponent.cs @@ -98,6 +98,5 @@ logic) Close(); } - } } diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormCreateOrder.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormCreateOrder.Designer.cs index d35f40f..b636a09 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormCreateOrder.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormCreateOrder.Designer.cs @@ -37,7 +37,6 @@ this.buttonSave = new System.Windows.Forms.Button(); this.buttonCancel = new System.Windows.Forms.Button(); this.textBoxSum = new System.Windows.Forms.TextBox(); - this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // label1 @@ -121,23 +120,13 @@ this.textBoxSum.ReadOnly = true; this.textBoxSum.Size = new System.Drawing.Size(446, 27); this.textBoxSum.TabIndex = 8; - // - // button1 - // - this.button1.Location = new System.Drawing.Point(190, 217); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(94, 29); - this.button1.TabIndex = 9; - this.button1.Text = "button1"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); + // // FormCreateOrder // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(720, 257); - this.Controls.Add(this.button1); this.Controls.Add(this.textBoxSum); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonSave); @@ -148,7 +137,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Name = "FormCreateOrder"; - this.Text = "FormCreateOrder"; + this.Text = "Создание заказа"; this.ResumeLayout(false); this.PerformLayout(); @@ -165,6 +154,5 @@ private Button buttonSave; private Button buttonCancel; private TextBox textBoxSum; - private Button button1; } } \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormCreateOrder.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormCreateOrder.cs index be84017..00bb665 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormCreateOrder.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormCreateOrder.cs @@ -45,8 +45,7 @@ namespace BlacksmithWorkshop comboBoxManufacture.ValueMember = "Id"; comboBoxManufacture.DataSource = _list; comboBoxManufacture.SelectedItem = null; - } - + } } private void CalcSum() diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs index a2d9846..4889d10 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs @@ -151,7 +151,7 @@ this.Controls.Add(this.menuStrip1); this.MainMenuStrip = this.menuStrip1; this.Name = "FormMain"; - this.Text = "FormMain"; + this.Text = "Магазин кузнечных изделий"; this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs index d982d58..c20301f 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs @@ -150,8 +150,7 @@ namespace BlacksmithWorkshop catch (Exception ex) { _logger.LogError(ex, "Ошибка отметки о готовности заказа"); - MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, -MessageBoxIcon.Error); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -200,7 +199,6 @@ MessageBoxIcon.Error); LoadData(); } - } } diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.Designer.cs index 8ede3d5..2672577 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.Designer.cs @@ -69,6 +69,7 @@ // this.textBoxPrice.Location = new System.Drawing.Point(156, 71); this.textBoxPrice.Name = "textBoxPrice"; + this.textBoxPrice.ReadOnly = true; this.textBoxPrice.Size = new System.Drawing.Size(204, 27); this.textBoxPrice.TabIndex = 3; // @@ -203,7 +204,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Name = "FormManufacture"; - this.Text = "FormManufacture"; + this.Text = "Создание изделия"; this.groupBox1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); this.ResumeLayout(false); diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.cs index a4df345..5443ddf 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.cs @@ -167,7 +167,6 @@ pc.Value.Item1.ComponentName, pc.Value.Item2 }); } } - } private void ButtonRef_Click(object sender, EventArgs e) @@ -240,6 +239,5 @@ MessageBoxIcon.Error); return Math.Round(price * 1.1, 2); } - } } diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufactures.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufactures.Designer.cs index 25c6ea8..6f34c25 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufactures.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufactures.Designer.cs @@ -98,7 +98,7 @@ this.Controls.Add(this.buttonAdd); this.Controls.Add(this.dataGridView); this.Name = "FormManufactures"; - this.Text = "FormManufactures"; + this.Text = "Список изделий"; ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); this.ResumeLayout(false); diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufactures.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufactures.cs index 610ce02..9fa95a1 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufactures.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufactures.cs @@ -60,14 +60,13 @@ namespace BlacksmithWorkshop } } - private void ButtonUpd_Click(object sender, EventArgs e) { if (dataGridView.SelectedRows.Count == 1) { var service = - Program.ServiceProvider?.GetService(typeof(FormComponent)); - if (service is FormComponent form) + Program.ServiceProvider?.GetService(typeof(FormManufacture)); + if (service is FormManufacture form) { form.Id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); diff --git a/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/BusinessLogics/OrderLogic.cs b/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/BusinessLogics/OrderLogic.cs index d179674..44f4c8b 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/BusinessLogics/OrderLogic.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/BusinessLogics/OrderLogic.cs @@ -77,8 +77,8 @@ namespace BlacksmithWorkshopBusinessLogic.BusinessLogics CheckModel(model); if(model.Status + 1 != newStatus) { + _logger.LogWarning("Status incorrected"); - return false; } @@ -103,10 +103,8 @@ namespace BlacksmithWorkshopBusinessLogic.BusinessLogics { return UpdateStatus(model, OrderStatus.Выполняется); - - + } - private void CheckModel(OrderBindingModel model, bool withParams = true) { @@ -132,8 +130,7 @@ namespace BlacksmithWorkshopBusinessLogic.BusinessLogics throw new ArgumentNullException("Неккоректный id изделия", nameof(model.Sum)); } _logger.LogInformation("Order. OrderID:{ Id}, Count:{ Count}. Sum: { sum} ", model.Id, model.Count, model.Sum); - - + } } } diff --git a/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/Class1.cs b/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/Class1.cs deleted file mode 100644 index 39ef163..0000000 --- a/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/Class1.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlacksmithWorkshopBusinessLogic -{ - public class Class1 - { - - } -} \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshopContracts/Class1.cs b/BlacksmithWorkshop/BlacksmithWorkshopContracts/Class1.cs deleted file mode 100644 index a9ea57f..0000000 --- a/BlacksmithWorkshop/BlacksmithWorkshopContracts/Class1.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlacksmithWorkshopContracts -{ - public class Class1 - { - - } -} \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshopDataModel/Class1.cs b/BlacksmithWorkshop/BlacksmithWorkshopDataModel/Class1.cs deleted file mode 100644 index 37a0874..0000000 --- a/BlacksmithWorkshop/BlacksmithWorkshopDataModel/Class1.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlacksmithWorkshopDataModel -{ - public class Class1 - { - - } -} \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Class1.cs b/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Class1.cs deleted file mode 100644 index 3757aae..0000000 --- a/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Class1.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlacksmithWorkshopListImplement -{ - public class Class1 - { - - } -} \ No newline at end of file