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