Compare commits
2 Commits
370cbb6699
...
b4eb8cd606
Author | SHA1 | Date | |
---|---|---|---|
b4eb8cd606 | |||
00bb983b8a |
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user