From 840586d4221a69a201f8f0c33af0ec31a53ebaca Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Sun, 30 Apr 2023 12:56:03 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=B0=D0=B6=D0=B8=D1=81=D1=8C=20=D1=81?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB,=20=D1=85=D0=BE=D0=BF=20=D1=85?= =?UTF-8?q?=D0=B5=D0=B9=20=D0=BB=D0=B0=D0=BB=D0=B0=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs | 1 - .../ViewModels/ManufactureViewModel.cs | 2 +- .../Models/ManufactureWorkPiece.cs | 4 ---- .../Models/MessageInfo.cs | 10 +--------- 4 files changed, 2 insertions(+), 15 deletions(-) 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; }