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