доделка по ворду

This commit is contained in:
Мк Игорь 2023-03-26 19:34:29 +04:00
parent 1e3d3e0e32
commit 66fec616b7
3 changed files with 7 additions and 5 deletions

View File

@ -88,8 +88,8 @@ namespace BlacksmithWorkShopBusinessLogic.BusinessLogics
_saveToWord.CreateDoc(new WordInfo
{
FileName = model.FileName,
Title = "Список компонент",
Components = _componentStorage.GetFullList()
Title = "Список изделий",
Manufactures = _manufactureStorage.GetFullList()
});
}
/// <summary>

View File

@ -20,13 +20,15 @@ namespace BlacksmithWorkshopBusinessLogic.OfficePackage
JustificationType = WordJustificationType.Center
}
});
foreach (var component in info.Components)
foreach (var manufacture in info.Manufactures)
{
CreateParagraph(new WordParagraph
{
Texts = new List<(string, WordTextProperties)>
{
(component.ComponentName, new WordTextProperties { Size = "24", })
(manufacture.ManufactureName, new WordTextProperties { Bold = true, Size = "24", }),
(" ", new WordTextProperties { Size = "24"}),
(manufacture.Price.ToString(), new WordTextProperties { Size = "24" })
},
TextProperties = new WordTextProperties
{

View File

@ -6,6 +6,6 @@ namespace BlacksmithWorkshopBusinessLogic.OfficePackage.HelperModels
{
public string FileName { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public List<ComponentViewModel> Components { get; set; } = new();
public List<ManufactureViewModel> Manufactures { get; set; } = new();
}
}