From 6a118d462201d75021713d5b15bb91541a98f7ef Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Mon, 22 Apr 2024 10:18:23 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D0=B5=20=D1=84=D0=B8=D0=BE=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D0=BD=D0=B8=D0=BA=D0=B0=20=D0=B2=D0=BE=20vie?= =?UTF-8?q?w=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D1=8C=20=D0=B7=D0=B0=D0=BA?= =?UTF-8?q?=D0=B0=D0=B7=D0=B0,=20=D0=BF=D0=BE=D1=80=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=B0=D0=BB=20=D0=BF=D0=BE=D0=BB=D0=B5=20id=20=D0=B2=20=D0=BC?= =?UTF-8?q?=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8=20=D0=B1=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SecuritySystemContracts/ViewModels/OrderViewModel.cs | 2 ++ .../SecuritySystemDatabaseImplement/Models/Order.cs | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/SecuritySystem/SecuritySystemContracts/ViewModels/OrderViewModel.cs b/SecuritySystem/SecuritySystemContracts/ViewModels/OrderViewModel.cs index 98ea577..3d1c1eb 100644 --- a/SecuritySystem/SecuritySystemContracts/ViewModels/OrderViewModel.cs +++ b/SecuritySystem/SecuritySystemContracts/ViewModels/OrderViewModel.cs @@ -11,6 +11,8 @@ namespace SecuritySystemContracts.ViewModels public int ClientId { get; set; } public int SecureId { get; set; } public int? ImplementerId { get; set; } + [DisplayName("ФИО работника")] + public string ImplementerFIO { get; set; } = string.Empty; [DisplayName("ФИО клиента")] public string ClientFIO { get; set; } = string.Empty; [DisplayName("Изделие")] diff --git a/SecuritySystem/SecuritySystemDatabaseImplement/Models/Order.cs b/SecuritySystem/SecuritySystemDatabaseImplement/Models/Order.cs index 3f334d3..e870e8b 100644 --- a/SecuritySystem/SecuritySystemDatabaseImplement/Models/Order.cs +++ b/SecuritySystem/SecuritySystemDatabaseImplement/Models/Order.cs @@ -13,6 +13,7 @@ namespace SecuritySystemDatabaseImplement.Models public int SecureId { get; private set; } [Required] public int ClientId { get; private set; } + public int? ImplementerId { get; private set; } [Required] public int Count { get; private set; } [Required] @@ -24,6 +25,7 @@ namespace SecuritySystemDatabaseImplement.Models public DateTime? DateImplement { get; private set; } public virtual Secure Secure { get; private set; } public virtual Client Client { get; private set; } + public virtual Implementer Implementer { get; private set; } public static Order? Create(OrderBindingModel? model) { if (model == null) @@ -40,6 +42,7 @@ namespace SecuritySystemDatabaseImplement.Models DateCreate = model.DateCreate, DateImplement = model.DateImplement, Id = model.Id, + ImplementerId = model.ImplementerId }; } @@ -51,6 +54,7 @@ namespace SecuritySystemDatabaseImplement.Models } Status = model.Status; DateImplement = model.DateImplement; + ImplementerId = model.ImplementerId; } public OrderViewModel GetViewModel => new() @@ -64,7 +68,9 @@ namespace SecuritySystemDatabaseImplement.Models Id = Id, Status = Status, SecureName = Secure.SecureName, - ClientFIO = Client.ClientFIO + ClientFIO = Client.ClientFIO, + ImplementerId = ImplementerId, + ImplementerFIO = Implementer.ImplementerFIO }; } }