Абстракция для водра готова

This commit is contained in:
Artyom_Yashin 2024-05-26 16:48:11 +04:00
parent 3a9eb0de13
commit 00bb983b8a

View File

@ -1,7 +1,7 @@
using BankBusinessLogic.OfficePackage.DocumentModels;
using BankBusinessLogic.OfficePackage.HelperEnums;
using BankBusinessLogic.OfficePackage.HelperModels;
using BlacksmithWorkshopBusinessLogic.OfficePackage.HelperModels;
using BankContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
@ -41,25 +41,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);