2023-04-06 19:55:04 +04:00
|
|
|
|
using HotelBusinessLogic.OfficePackage.HelperEnums;
|
|
|
|
|
using HotelBusinessLogic.OfficePackage.HelperModels;
|
|
|
|
|
|
|
|
|
|
namespace HotelBusinessLogic.OfficePackage
|
|
|
|
|
{
|
|
|
|
|
public abstract class AbstractSaveToWordOrganiser
|
|
|
|
|
{
|
|
|
|
|
public void CreateDoc(WordInfoOrganiser info)
|
|
|
|
|
{
|
|
|
|
|
CreateWord(info);
|
|
|
|
|
|
|
|
|
|
CreateParagraph(new WordParagraph
|
|
|
|
|
{
|
|
|
|
|
Texts = new List<(string, WordTextProperties)> { (info.Title, new WordTextProperties { Bold = true, Size = "24", }) },
|
|
|
|
|
TextProperties = new WordTextProperties
|
|
|
|
|
{
|
|
|
|
|
Size = "24",
|
|
|
|
|
JustificationType = WordJustificationType.Center
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
foreach (var mc in info.MemberConferences)
|
|
|
|
|
{
|
|
|
|
|
CreateParagraph(new WordParagraph
|
|
|
|
|
{
|
|
|
|
|
Texts = new List<(string, WordTextProperties)>
|
2023-04-07 13:49:59 +04:00
|
|
|
|
{ (mc.MemberFIO+" - ", new WordTextProperties { Size = "20", Bold=true})},
|
2023-04-06 19:55:04 +04:00
|
|
|
|
TextProperties = new WordTextProperties
|
|
|
|
|
{
|
|
|
|
|
Size = "24",
|
|
|
|
|
JustificationType = WordJustificationType.Both
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
foreach (var conference in mc.Conferences)
|
|
|
|
|
{
|
|
|
|
|
CreateParagraph(new WordParagraph
|
|
|
|
|
{
|
|
|
|
|
Texts = new List<(string, WordTextProperties)>
|
2023-04-07 13:49:59 +04:00
|
|
|
|
{ (conference.Item1 + " - ", new WordTextProperties { Size = "16", Bold=false}),
|
|
|
|
|
(conference.Item2.ToShortDateString(), new WordTextProperties { Size = "16", Bold=false})},
|
2023-04-06 19:55:04 +04:00
|
|
|
|
TextProperties = new WordTextProperties
|
|
|
|
|
{
|
|
|
|
|
Size = "24",
|
|
|
|
|
JustificationType = WordJustificationType.Both
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
SaveWord(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected abstract void CreateWord(WordInfoOrganiser info);
|
|
|
|
|
protected abstract void CreateParagraph(WordParagraph paragraph);
|
|
|
|
|
protected abstract void SaveWord(WordInfoOrganiser info);
|
|
|
|
|
}
|
|
|
|
|
}
|