diff --git a/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/FurnitureAssemblyDatabase.cs b/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/FurnitureAssemblyDatabase.cs index ef1bba3..5f939e3 100644 --- a/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/FurnitureAssemblyDatabase.cs +++ b/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/FurnitureAssemblyDatabase.cs @@ -14,7 +14,7 @@ namespace FurnitureAssemblyDatabaseImplement { if (optionsBuilder.IsConfigured == false) { - optionsBuilder.UseSqlServer(@"Data Source=KatanaNik\SQLEXPRESS;Initial Catalog=FurnitureAssemblyDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + optionsBuilder.UseSqlServer(@"Data Source=WIN-N21FHIN3LLR\SQLEXPRESS;Initial Catalog=FurnitureAssemblyDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); diff --git a/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/Models/Order.cs b/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/Models/Order.cs index 07268ab..9267bc1 100644 --- a/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/Models/Order.cs +++ b/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/Models/Order.cs @@ -32,7 +32,6 @@ namespace FurnitureAssemblyDatabaseImplement.Models public DateTime? DateImplement { get; private set; } - // Для передачи названия изделия public virtual Furniture Furniture { get; set; } public static Order? Create(OrderBindingModel model) diff --git a/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/Models/WorkPiece.cs b/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/Models/WorkPiece.cs index 145160c..8dcce39 100644 --- a/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/Models/WorkPiece.cs +++ b/FurnitureAssembly/FurnitureAssemblyDatabaseImplement/Models/WorkPiece.cs @@ -21,7 +21,6 @@ namespace FurnitureAssemblyDatabaseImplement.Models [Required] public double Cost { get; set; } - // для реализации связи многие ко многим с изделиями [ForeignKey("WorkPieceId")] public virtual List FurnitureWorkPieces { get; set; } = new(); diff --git a/FurnitureAssembly/FurnitureAssemblyView/FormFurnitures.Designer.cs b/FurnitureAssembly/FurnitureAssemblyView/FormFurnitures.Designer.cs index bd82c4e..f51032d 100644 --- a/FurnitureAssembly/FurnitureAssemblyView/FormFurnitures.Designer.cs +++ b/FurnitureAssembly/FurnitureAssemblyView/FormFurnitures.Designer.cs @@ -45,6 +45,7 @@ this.buttonAdd.TabIndex = 0; this.buttonAdd.Text = "Добавить"; this.buttonAdd.UseVisualStyleBackColor = true; + this.buttonAdd.Click += new System.EventHandler(this.ButtonAdd_Click); // // buttonUpdate // @@ -55,6 +56,7 @@ this.buttonUpdate.TabIndex = 1; this.buttonUpdate.Text = "Изменить"; this.buttonUpdate.UseVisualStyleBackColor = true; + this.buttonUpdate.Click += new System.EventHandler(this.ButtonUpdate_Click); // // buttonDelete // @@ -65,6 +67,7 @@ this.buttonDelete.TabIndex = 2; this.buttonDelete.Text = "Удалить"; this.buttonDelete.UseVisualStyleBackColor = true; + this.buttonDelete.Click += new System.EventHandler(this.ButtonDelete_Click); // // buttonRef // @@ -75,6 +78,7 @@ this.buttonRef.TabIndex = 3; this.buttonRef.Text = "Обновить"; this.buttonRef.UseVisualStyleBackColor = true; + this.buttonRef.Click += new System.EventHandler(this.ButtonRef_Click); // // dataGridView // @@ -101,6 +105,7 @@ this.Name = "FormFurnitures"; this.Text = "Изделия"; this.Load += new System.EventHandler(this.FormFurnitures_Load); + this.Click += new System.EventHandler(this.FormFurnitures_Load); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); this.ResumeLayout(false); diff --git a/FurnitureAssembly/FurnitureAssemblyView/Program.cs b/FurnitureAssembly/FurnitureAssemblyView/Program.cs index 93cbd6f..505b971 100644 --- a/FurnitureAssembly/FurnitureAssemblyView/Program.cs +++ b/FurnitureAssembly/FurnitureAssemblyView/Program.cs @@ -1,7 +1,7 @@ using FurnitureAssemblyBusinessLogic.BussinessLogic; using FurnitureAssemblyContracts.BusinessLogicsContracts; using FurnitureAssemblyContracts.StoragesContracts; -using FurnitureAssemblyFileImplement.Implements; +using FurnitureAssemblyDatabaseImplement.Implements; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging;