Пример #1
0
        private void AddWeightTicketsTable(List <WeightTicket> weightTickets, Document document)
        {
            PdfPrinterHelper <WeightTicket> helper = new PdfPrinterHelper <WeightTicket>();
            Paragraph currentParagraph             = document.LastSection.AddParagraph();

            currentParagraph = document.LastSection.AddParagraph();
            currentParagraph.AddFormattedText("Boletas en liquidación", "Heading2");
            if (weightTickets.Count > 0)
            {
                Table table = helper.GetTableFromList(weightTickets, weightTicketsPrintColumns, percentageColumns, true, weightTicketColumnsToSum);
                table.Rows.Alignment = RowAlignment.Left;
                document.LastSection.Add(table);
            }
            else
            {
                currentParagraph = document.LastSection.AddParagraph();
                currentParagraph.AddText("No hay boletas");
            }
        }
Пример #2
0
        private void AddPaymentsTableAndSummaryTable(List <SettlementPayment> payments, Document document, Settlement settlement)
        {
            PdfPrinterHelper <SettlementPayment> helper = new PdfPrinterHelper <SettlementPayment>();

            Paragraph currentParagraph = document.LastSection.AddParagraph();

            currentParagraph = document.LastSection.AddParagraph();
            currentParagraph.AddFormattedText("Pagos en liquidación:", "Heading2");
            currentParagraph = document.LastSection.AddParagraph();
            if (payments.Count > 0)
            {
                Table paymentsTable = helper.GetTableFromList(payments, paymentsPrintColumns);
                paymentsTable.Rows.Alignment = RowAlignment.Left;
                document.LastSection.Add(paymentsTable);
            }
            else
            {
                currentParagraph = document.LastSection.AddParagraph();
                currentParagraph.AddText("No hay pagos");
            }
            document.LastSection.AddParagraph();
            currentParagraph = document.LastSection.AddParagraph();
            currentParagraph.AddFormattedText("Resumen:", "Heading2");
            document.LastSection.AddParagraph();
            Table summaryTable = CreateSummaryTable(payments, settlement);

            summaryTable.Rows.Alignment = RowAlignment.Left;
            document.LastSection.Add(summaryTable);

            /*  //We need a master table with two columns borderless and two cells
             * Table masterTable = new Table();
             * masterTable.Borders.Width = 0;
             * masterTable.Columns.AddColumn();
             * masterTable.Columns.AddColumn();
             * Row firstTableRow = masterTable.AddRow();
             * firstTableRow.Cells[0].Elements.Add(paymentsTable);
             * firstTableRow.Cells[1].Elements.Add(summaryTable);*/
        }