Compare commits
2 Commits
13551f5767
...
67678e82e2
Author | SHA1 | Date | |
---|---|---|---|
67678e82e2 | |||
c106b0bf3c |
@ -202,6 +202,8 @@ namespace BankYouBankruptBusinessLogic.OfficePackage
|
||||
//номер строчки в докуметне
|
||||
uint rowIndex = 3;
|
||||
|
||||
//string supportNumber = string.Empty;
|
||||
|
||||
foreach (var cr in info.Crediting)
|
||||
{
|
||||
//вставляет номер перевода
|
||||
@ -258,6 +260,46 @@ namespace BankYouBankruptBusinessLogic.OfficePackage
|
||||
|
||||
rowIndex++;
|
||||
|
||||
//формирование списка поступления по каждой карте
|
||||
var dict = new Dictionary<string, int>();
|
||||
|
||||
foreach(var elem in info.Crediting)
|
||||
{
|
||||
if (dict.ContainsKey(elem.CardNumber))
|
||||
{
|
||||
dict[elem.CardNumber] += elem.Sum;
|
||||
}
|
||||
else
|
||||
{
|
||||
dict[elem.CardNumber] = elem.Sum;
|
||||
}
|
||||
}
|
||||
|
||||
foreach(var elem in dict)
|
||||
{
|
||||
//строчка с номером счёта получателя
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "B",
|
||||
RowIndex = rowIndex,
|
||||
Text = "Сумма пополнения на карту №" + elem.Key + ":",
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBorder
|
||||
});
|
||||
|
||||
//вставка номера отправителя
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "C",
|
||||
RowIndex = rowIndex,
|
||||
Text = elem.Value.ToString(),
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBorder
|
||||
});
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
rowIndex++;
|
||||
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "A",
|
||||
@ -362,6 +404,46 @@ namespace BankYouBankruptBusinessLogic.OfficePackage
|
||||
|
||||
rowIndex++;
|
||||
|
||||
//формирование списка поступления по каждой карте
|
||||
var dict = new Dictionary<string, int>();
|
||||
|
||||
foreach (var elem in info.Debiting)
|
||||
{
|
||||
if (dict.ContainsKey(elem.CardNumber))
|
||||
{
|
||||
dict[elem.CardNumber] += elem.Sum;
|
||||
}
|
||||
else
|
||||
{
|
||||
dict[elem.CardNumber] = elem.Sum;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var elem in dict)
|
||||
{
|
||||
//строчка с номером счёта получателя
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "B",
|
||||
RowIndex = rowIndex,
|
||||
Text = "Сумма снятия с карты №" + elem.Key + ":",
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBorder
|
||||
});
|
||||
|
||||
//вставка номера отправителя
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "C",
|
||||
RowIndex = rowIndex,
|
||||
Text = elem.Value.ToString(),
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBorder
|
||||
});
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
rowIndex++;
|
||||
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "A",
|
||||
|
@ -93,6 +93,17 @@ namespace BankYouBankruptBusinessLogic.OfficePackage
|
||||
});
|
||||
}
|
||||
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)> { ("Суммарный объём переводов: " + info.MoneyTransfer.Sum(x => x.Sum).ToString(),
|
||||
new WordTextProperties { Bold = true, Size = "24" }) },
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
JustificationType = WordJustificationType.Both
|
||||
}
|
||||
});
|
||||
|
||||
SaveWord(info);
|
||||
}
|
||||
|
||||
@ -152,6 +163,34 @@ namespace BankYouBankruptBusinessLogic.OfficePackage
|
||||
});
|
||||
}
|
||||
|
||||
//формирование списка поступления по каждой карте
|
||||
var dict = new Dictionary<string, int>();
|
||||
|
||||
foreach (var elem in info.Crediting)
|
||||
{
|
||||
if (dict.ContainsKey(elem.CardNumber))
|
||||
{
|
||||
dict[elem.CardNumber] += elem.Sum;
|
||||
}
|
||||
else
|
||||
{
|
||||
dict[elem.CardNumber] = elem.Sum;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var elem in dict)
|
||||
{
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)> { ("Суммарное пополнение на карту №" + elem.Key + ": " + elem.Value.ToString(), new WordTextProperties { Bold = true, Size = "24" }) },
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
JustificationType = WordJustificationType.Both
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
SaveWord(info);
|
||||
}
|
||||
|
||||
@ -210,6 +249,34 @@ namespace BankYouBankruptBusinessLogic.OfficePackage
|
||||
});
|
||||
}
|
||||
|
||||
//формирование списка поступления по каждой карте
|
||||
var dict = new Dictionary<string, int>();
|
||||
|
||||
foreach (var elem in info.Debiting)
|
||||
{
|
||||
if (dict.ContainsKey(elem.CardNumber))
|
||||
{
|
||||
dict[elem.CardNumber] += elem.Sum;
|
||||
}
|
||||
else
|
||||
{
|
||||
dict[elem.CardNumber] = elem.Sum;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var elem in dict)
|
||||
{
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)> { ("Суммарное снятие с карты №" + elem.Key + ": " + elem.Value.ToString(), new WordTextProperties { Bold = true, Size = "24" }) },
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
JustificationType = WordJustificationType.Both
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
SaveWord(info);
|
||||
}
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
using BankYouBankruptBusinessLogic.OfficePackage.HelperEnums;
|
||||
using BankYouBankruptBusinessLogic.OfficePackage.HelperModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BankYouBankruptBusinessLogic.OfficePackage
|
||||
{
|
||||
public abstract class AbstractSaveToWordCashier
|
||||
{
|
||||
//метод создания документа
|
||||
public void CreateDoc(WordInfo info)
|
||||
{
|
||||
CreateWord(info);
|
||||
|
||||
//создание ряда абзацев
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)> { (info.Title, new WordTextProperties { Bold = true, Size = "24", }) },
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
JustificationType = WordJustificationType.Center
|
||||
}
|
||||
});
|
||||
|
||||
//TODO
|
||||
|
||||
SaveWord(info);
|
||||
}
|
||||
|
||||
// Создание doc-файла
|
||||
protected abstract void CreateWord(WordInfo info);
|
||||
|
||||
// Создание абзаца с текстом
|
||||
protected abstract void CreateParagraph(WordParagraph paragraph);
|
||||
|
||||
// Сохранение файла
|
||||
protected abstract void SaveWord(WordInfo info);
|
||||
}
|
||||
}
|
@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
|
@ -24,7 +24,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер счёта
|
||||
Номер карты
|
||||
</th>
|
||||
<th>
|
||||
Баланс
|
||||
|
Loading…
Reference in New Issue
Block a user