From 04e18374da67cde021dc9ed0e76a572cbfcb191b Mon Sep 17 00:00:00 2001 From: Piotr Kus Date: Wed, 7 May 2025 20:03:29 +0200 Subject: [PATCH] * Added Recipient description to Products view --- FaKrosnoEfDataModel/Dtos/ProductDto.cs | 3 +++ FaKrosnoEfDataModel/Entities/Product.cs | 2 ++ OrdersManagement/Components/Pages/Products.razor | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/FaKrosnoEfDataModel/Dtos/ProductDto.cs b/FaKrosnoEfDataModel/Dtos/ProductDto.cs index 6883ce1..26a67eb 100644 --- a/FaKrosnoEfDataModel/Dtos/ProductDto.cs +++ b/FaKrosnoEfDataModel/Dtos/ProductDto.cs @@ -6,4 +6,7 @@ public class ProductDto : DtoBase public int RecipientID { get; set; } public string RecipientIdx { get; set; } public string FaIdx { get; set; } + public string RecipientName => Recipient.RecipientDesc; + + public RecipientDto Recipient { get; set; } } \ No newline at end of file diff --git a/FaKrosnoEfDataModel/Entities/Product.cs b/FaKrosnoEfDataModel/Entities/Product.cs index 554a2ac..afd31c1 100644 --- a/FaKrosnoEfDataModel/Entities/Product.cs +++ b/FaKrosnoEfDataModel/Entities/Product.cs @@ -6,4 +6,6 @@ public class Product : EntityBase public int RecipientID { get; set; } public string RecipientIdx { get; set; } public string FaIdx { get; set; } + + public Recipient Recipient { get; set; } } \ No newline at end of file diff --git a/OrdersManagement/Components/Pages/Products.razor b/OrdersManagement/Components/Pages/Products.razor index 3ef59a6..3f836cc 100644 --- a/OrdersManagement/Components/Pages/Products.razor +++ b/OrdersManagement/Components/Pages/Products.razor @@ -18,7 +18,7 @@ Toolbar="@(new List { "Update" })"> - +