diff --git a/ComputersShop/ComputersShopContracts/ViewModels/OrderViewModel.cs b/ComputersShop/ComputersShopContracts/ViewModels/OrderViewModel.cs index dda0004..9fc5389 100644 --- a/ComputersShop/ComputersShopContracts/ViewModels/OrderViewModel.cs +++ b/ComputersShop/ComputersShopContracts/ViewModels/OrderViewModel.cs @@ -21,8 +21,11 @@ namespace ComputersShopContracts.ViewModels [Column(visible: false)] public int ClientId { get; set; } - [Column("Данные клиента", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)] public string ClientFIO { get; set; } = string.Empty; - public string ClientEmail { get; set; } = string.Empty; + [Column("Данные клиента", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)] + public string ClientFIO { get; set; } = string.Empty; + + [Column(visible: false)] + public string ClientEmail { get; set; } = string.Empty; [Column(visible: false)] public int? ImplementerId { get; set; } diff --git a/ComputersShop/ComputersShopDataBaseImplement/Models/Client.cs b/ComputersShop/ComputersShopDataBaseImplement/Models/Client.cs index 123e2b1..2943af6 100644 --- a/ComputersShop/ComputersShopDataBaseImplement/Models/Client.cs +++ b/ComputersShop/ComputersShopDataBaseImplement/Models/Client.cs @@ -33,6 +33,9 @@ namespace ComputersShopDataBaseImplement.Models [ForeignKey("ClientId")] public virtual List Orders { get; set; } = new(); + [ForeignKey("ClientId")] + public virtual List Messages { get; set; } = new(); + public static Client? Create(ClientBindingModel model) { if (model == null) diff --git a/ComputersShop/ComputersShopDataBaseImplement/Models/Message.cs b/ComputersShop/ComputersShopDataBaseImplement/Models/Message.cs index 17df01d..8bf2073 100644 --- a/ComputersShop/ComputersShopDataBaseImplement/Models/Message.cs +++ b/ComputersShop/ComputersShopDataBaseImplement/Models/Message.cs @@ -19,6 +19,8 @@ namespace ComputersShopDataBaseImplement.Models public int? ClientId { get; private set; } + public virtual Client? Client { get; set; } + public string SenderName { get; private set; } = string.Empty; public DateTime DateDelivery { get; private set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); diff --git a/ComputersShop/ImplementationExtensions/ComputersShopContracts.dll b/ComputersShop/ImplementationExtensions/ComputersShopContracts.dll new file mode 100644 index 0000000..975d73c Binary files /dev/null and b/ComputersShop/ImplementationExtensions/ComputersShopContracts.dll differ diff --git a/ComputersShop/ImplementationExtensions/ComputersShopDataBaseImplement.dll b/ComputersShop/ImplementationExtensions/ComputersShopDataBaseImplement.dll new file mode 100644 index 0000000..9cc3600 Binary files /dev/null and b/ComputersShop/ImplementationExtensions/ComputersShopDataBaseImplement.dll differ diff --git a/ComputersShop/ImplementationExtensions/ComputersShopFileImplement.dll b/ComputersShop/ImplementationExtensions/ComputersShopFileImplement.dll new file mode 100644 index 0000000..cdb47e3 Binary files /dev/null and b/ComputersShop/ImplementationExtensions/ComputersShopFileImplement.dll differ diff --git a/ComputersShop/ImplementationExtensions/СomputersShopDataModels.dll b/ComputersShop/ImplementationExtensions/СomputersShopDataModels.dll new file mode 100644 index 0000000..447c605 Binary files /dev/null and b/ComputersShop/ImplementationExtensions/СomputersShopDataModels.dll differ