diff --git a/ComputerShopProvider/ComputerShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs b/ComputerShopProvider/ComputerShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs index 64df9e8..ae19195 100644 --- a/ComputerShopProvider/ComputerShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs +++ b/ComputerShopProvider/ComputerShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs @@ -1,5 +1,7 @@ using ComputerShopBusinessLogic.OfficePackage.HelperEnums; using ComputerShopBusinessLogic.OfficePackage.HelperModels; +using ComputerShopDataModels.Enums; +using DocumentFormat.OpenXml.Bibliography; using System; using System.Collections.Generic; using System.Linq; @@ -36,7 +38,7 @@ namespace ComputerShopBusinessLogic.OfficePackage { CreateRow(new PdfRowParameters { - Texts = new List { supplyPurchase.Purchase.Id.ToString(), supplyPurchase.Purchase.ComponentName, supplyPurchase.Purchase.DateCreate.ToString(), supplyPurchase.Supply.DateCreate.ToString(), supplyPurchase.Supply.Status.ToString()}, + Texts = new List { supplyPurchase.Purchase.Id.ToString(), supplyPurchase.Purchase.ComponentName, supplyPurchase.Purchase.DateCreate.ToString(), supplyPurchase.Supply.DateCreate.ToString(), Enum.GetName(typeof(SupplyStatus), supplyPurchase.Supply.Status) }, Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Left }); diff --git a/ComputerShopProvider/ComputerShopClientApp/Controllers/HomeController.cs b/ComputerShopProvider/ComputerShopClientApp/Controllers/HomeController.cs index a298cf0..b7bdffa 100644 --- a/ComputerShopProvider/ComputerShopClientApp/Controllers/HomeController.cs +++ b/ComputerShopProvider/ComputerShopClientApp/Controllers/HomeController.cs @@ -3,6 +3,7 @@ using ComputerShopContracts.BindingModels; using ComputerShopContracts.BusinessLogicContracts; using ComputerShopContracts.SearchModels; using ComputerShopContracts.ViewModels; +using ComputerShopDataModels.Enums; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Mvc; using Microsoft.IdentityModel.Protocols.OpenIdConnect; @@ -211,7 +212,7 @@ namespace ComputerShopClientApp.Controllers table += $"{report.Purchase.ComponentName}"; table += $"{report.Purchase.DateCreate.ToShortDateString()}"; table += $"{report.Supply.DateCreate.ToShortDateString()}"; - table += $"{report.Supply.Status.ToString()}"; + table += $"{Enum.GetName(typeof(SupplyStatus), report.Supply.Status)}"; table += ""; table += ""; }