This commit is contained in:
Artyom_Yashin 2024-05-26 16:48:57 +04:00
commit b4eb8cd606

View File

@ -15,25 +15,33 @@ namespace BankBusinessLogic.OfficePackage
public void CreateRequestsDoc(WordInfo info)
{
CreateWord(info);
List<List<string>> list = new List<List<string>>();
foreach (var shop in info.Shops)
List<List<string>> table = new List<List<string>>();
List<ReportRequestsViewModel> reports = info.Requests;
foreach (ReportRequestsViewModel report in reports)
{
var ls = new List<string>
foreach (RequestViewModel request in report.Requests)
{
shop.ShopName,
shop.Address,
shop.OpeningDate.ToShortDateString()
};
list.Add(ls);
List<string> row = new List<string>
{
report.AccountNumber,
request.Id.ToString(),
request.Status.ToString(),
request.Sum.ToString(),
request.RequestTime.ToString(),
};
table.Add(row);
}
}
var wordTable = new WordTable
{
Headers = new List<string> {
"Название",
"Адрес",
"Дата открытия"},
Columns = 3,
RowText = list
"Номер карты",
"Номер заявки",
"Статус заявки",
"Сумма выдачи",
"Дата заявки"},
Columns = 5,
RowText = table
};
CreateTable(wordTable);
SaveWord(info);