Word Done
This commit is contained in:
parent
c7b874d580
commit
2b5739b429
@ -96,8 +96,8 @@ namespace ComputerShopBusinessLogic.BusinessLogics
|
||||
_saveToWord.CreateDoc(new WordInfo
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Список компонент",
|
||||
Components = _componentStorage.GetFullList()
|
||||
Title = "Список компьютеров",
|
||||
Computers = _productStorage.GetFullList()
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -22,17 +22,21 @@ namespace ComputerShopBusinessLogic.OfficePackage
|
||||
JustificationType = WordJustificationType.Center
|
||||
}
|
||||
});
|
||||
foreach (var component in info.Components)
|
||||
foreach (var computer in info.Computers)
|
||||
{
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)> {(component.ComponentName, new WordTextProperties { Size = "24", }) },
|
||||
Texts = new List<(string, WordTextProperties)>
|
||||
{(computer.ComputerName + " - ", new WordTextProperties { Size = "24", Bold = true}),
|
||||
(computer.Price.ToString(), new WordTextProperties { Size = "24", })},
|
||||
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
JustificationType = WordJustificationType.Both
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
SaveWord(info);
|
||||
}
|
||||
|
@ -11,6 +11,6 @@ namespace ComputerShopBusinessLogic.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<ComputerViewModel> Computers { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user