diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs index 7f3c5c6..07305cd 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs @@ -200,7 +200,6 @@ namespace BlacksmithWorkshop { MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } - } } } \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ManufactureViewModel.cs b/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ManufactureViewModel.cs index c8ccd7f..d027131 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ManufactureViewModel.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ManufactureViewModel.cs @@ -15,7 +15,7 @@ namespace BlacksmithWorkshopContracts.ViewModels [Column(visible: false)] public int Id { get; set; } - [Column(title: "Навание изделия", width: 150)] + [Column(title: "Навание изделия", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)] public string ManufactureName { get; set; } = string.Empty; [Column(title: "Цена", width: 150)] diff --git a/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/ManufactureWorkPiece.cs b/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/ManufactureWorkPiece.cs index 8bfea2a..09640c9 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/ManufactureWorkPiece.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/ManufactureWorkPiece.cs @@ -11,19 +11,15 @@ namespace BlacksmithWorkshopDatabaseImplement.Models [DataContract] public class ManufactureWorkPiece { - [DataMember] public int Id { get; set; } [Required] - [DataMember] public int ManufactureId { get; set; } [Required] - [DataMember] public int WorkPieceId { get; set; } [Required] - [DataMember] public int Count { get; set; } public virtual WorkPiece WorkPiece { get; set; } = new(); diff --git a/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/MessageInfo.cs b/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/MessageInfo.cs index 9f67f02..c4c08a5 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/MessageInfo.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/MessageInfo.cs @@ -14,7 +14,7 @@ namespace BlacksmithWorkshopDatabaseImplement.Models [DataContract] public class MessageInfo : IMessageInfoModel { - public int Id { get; set; } + public int Id => throw new NotImplementedException(); [Key] [DataMember] @@ -22,20 +22,12 @@ namespace BlacksmithWorkshopDatabaseImplement.Models public int? ClientId { get; set; } - [Required] - [DataMember] public string SenderName { get; set; } = string.Empty; - [Required] - [DataMember] public DateTime DateDelivery { get; set; } = DateTime.Now; - [Required] - [DataMember] public string Subject { get; set; } = string.Empty; - [Required] - [DataMember] public string Body { get; set; } = string.Empty; public virtual Client? Client { get; set; }