Compare commits

..

2 Commits

Author SHA1 Message Date
b4eb8cd606 Фикс 2024-05-26 16:48:57 +04:00
00bb983b8a Абстракция для водра готова 2024-05-26 16:48:11 +04:00

View File

@ -2,7 +2,6 @@
using BankBusinessLogic.OfficePackage.HelperEnums;
using BankBusinessLogic.OfficePackage.HelperModels;
using BankContracts.ViewModels;
using BlacksmithWorkshopBusinessLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
@ -50,25 +49,36 @@ namespace BankBusinessLogic.OfficePackage
public void CreateTransfersDoc(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<ReportTransfersViewModel> reports = info.Transfers;
foreach (ReportTransfersViewModel report in reports)
{
var ls = new List<string>
foreach(TransferViewModel transfer in report.Transfers)
{
shop.ShopName,
shop.Address,
shop.OpeningDate.ToShortDateString()
};
list.Add(ls);
List<string> row = new List<string>
{
report.CardNumber,
transfer.Id.ToString(),
transfer.Sum.ToString(),
transfer.TransferTime.ToString(),
transfer.SenderAccountNumber,
transfer.RecipientAccountNumber,
};
table.Add(row);
}
}
var wordTable = new WordTable
{
Headers = new List<string> {
"Название",
"Адрес",
"Дата открытия"},
Columns = 3,
RowText = list
"Номер карты",
"Номер перевода",
"Сумма",
"Время перевода",
"Карта отправителя",
"Карта получателя"
},
Columns = 6,
RowText = table
};
CreateTable(wordTable);
SaveWord(info);