Ejemplo n.º 1
0
        private void CreateSettledAmountRow(BankSection sec)
        {
            var settledlabel = _worksheet.Cell(_currentRowIndex, _indexOfFirstColumn);

            settledlabel.Value               = "Settled";
            settledlabel.DataType            = XLCellValues.Text;
            settledlabel.Style.Font.FontSize = FontSize;

            var settledCell = _worksheet.Cell(_currentRowIndex, _currentColumnIndex);

            settledCell.Value = sec.SettledAmount;
            settledCell.Style.NumberFormat.Format = "#,##0.00_);[Red](#,##0.00)";
            settledCell.DataType            = XLCellValues.Number;
            settledCell.Style.Font.FontSize = FontSize;
        }
Ejemplo n.º 2
0
        private void CreateTotalPerBankRows(BankSection sec)
        {
            var subTotalLabel = _sheet.Cell(_currentRowIndex, 1);

            subTotalLabel.Value               = "Total";
            subTotalLabel.DataType            = XLCellValues.Text;
            subTotalLabel.Style.Font.FontSize = FontSize;

            var subTotalCell = _sheet.Cell(_currentRowIndex, 5);

            subTotalCell.Value = sec.Amount;
            subTotalCell.Style.NumberFormat.Format = "#,##0.00_);[Red](#,##0.00)";
            subTotalCell.DataType            = XLCellValues.Number;
            subTotalCell.Style.Font.FontSize = FontSize;
        }
Ejemplo n.º 3
0
        private void CreateForFundingAmountPerBankRow(BankSection sec)
        {
            var forFundingLabel = _sheet.Cell(_currentRowIndex, 1);

            forFundingLabel.Value               = "For Funding";
            forFundingLabel.DataType            = XLCellValues.Text;
            forFundingLabel.Style.Font.FontSize = FontSize;

            var forFundingAmountCell = _sheet.Cell(_currentRowIndex, 5);

            forFundingAmountCell.Value = sec.RemainingAmount;
            forFundingAmountCell.Style.NumberFormat.Format = "#,##0.00_);[Red](#,##0.00)";
            forFundingAmountCell.Style.Border.TopBorder    = XLBorderStyleValues.Medium;
            forFundingAmountCell.DataType            = XLCellValues.Number;
            forFundingAmountCell.Style.Font.FontSize = FontSize;
        }
Ejemplo n.º 4
0
        private void CreateForFundingAmountRow(BankSection sec)
        {
            var forFundingLabel = _worksheet.Cell(_currentRowIndex, _indexOfFirstColumn);

            forFundingLabel.Value               = "For Funding";
            forFundingLabel.DataType            = XLCellValues.Text;
            forFundingLabel.Style.Font.FontSize = FontSize;
            forFundingLabel.Style.Font.Bold     = true;

            var forFundingAmountCell = _worksheet.Cell(_currentRowIndex, _currentColumnIndex);

            forFundingAmountCell.Value = sec.RemainingAmount;
            forFundingAmountCell.Style.NumberFormat.Format = "#,##0.00_);[Red](#,##0.00)";
            forFundingAmountCell.Style.Border.TopBorder    = XLBorderStyleValues.Thin;
            forFundingAmountCell.DataType            = XLCellValues.Number;
            forFundingAmountCell.Style.Font.FontSize = FontSize;
            forFundingAmountCell.Style.Font.Bold     = true;
        }
Ejemplo n.º 5
0
        private void CreateBankSection(BankSection sec)
        {
            var bankCell = _sheet.Cell(_currentRowIndex, 2);

            bankCell.Value               = sec.Bank.BankName;
            bankCell.DataType            = XLCellValues.Text;
            bankCell.Style.Font.FontSize = FontSize;

            foreach (var c in sec.ChecksToDisplay)
            {
                _currentRowIndex++;
                CreateCheckRow(c);
            }

            _currentRowIndex = _currentRowIndex + 2;
            CreateTotalPerBankRows(sec);

            _currentRowIndex++;
            CreateSettledAmountPerBankRow(sec);

            _currentRowIndex++;
            CreateForFundingAmountPerBankRow(sec);
        }