Пример #1
0
        protected override void OnBuildSection()
        {
            try
            {
                if (GroupData.Rows.Count < 1)
                {
                    return;
                }

                // Header row
                HeaderCells.Add(GetCell("CSR #", DataFontBold, Element.ALIGN_JUSTIFIED));
                HeaderCells.Add(GetCell("Loan Status", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Customer", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Time", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Amount", DataFontBold, Element.ALIGN_RIGHT));

                PdfPTable dataTable = new PdfPTable(HeaderCells.Count);
                AddGroupTitle(dataTable, "Rescissions");

                AddHeaderCells(dataTable);
                dataTable.HeaderRows = 2;

                PrintGroupDetail(dataTable);
                dataTable.AddCell(GetCell("Total", DataFont, Element.ALIGN_JUSTIFIED, 2, Rectangle.TOP_BORDER));
                dataTable.AddCell(GetCell(_Count.ToString(), DataFont, Element.ALIGN_LEFT, 1, Rectangle.TOP_BORDER));
                dataTable.AddCell(GetCell(GetCurrencyValue(_Total), DataFont, Element.ALIGN_RIGHT, 2, Rectangle.TOP_BORDER));

                AddGroupContentsToPdfTable(dataTable);
            }
            catch (Exception ex)
            {
                ErrorText = ex.Message;
                ErrorCode = "1";
                throw;
            }
        }
Пример #2
0
 public GridViewModel <T> AddHeaderCell(string text, string sortKey)
 {
     HeaderCells.Add(new GridCellViewModel(text, sortKey));
     return(this);
 }
Пример #3
0
        protected override void OnBuildSection()
        {
            try
            {
                if (GroupData.Rows.Count < 1)
                {
                    return;
                }

                count      = 0;
                total      = 0;
                total_tax  = 0;
                total_fees = 0;
                grandTotal = 0;


                // Header row
                HeaderCells.Clear();
                HeaderCells.Add(GetCell("CSR #", DataFontBold, Element.ALIGN_LEFT));
                if (!isLayaway)
                {
                    HeaderCells.Add(GetCell("MSR #", DataFontBold, Element.ALIGN_LEFT));
                }
                if (!isLayaway && _title.Equals("Retail Sale Refunds"))
                {
                    HeaderCells.Add(GetCell("Refund #", DataFontBold, Element.ALIGN_LEFT));
                }
                else
                {
                    HeaderCells.Add(GetCell("Layaway #", DataFontBold, Element.ALIGN_LEFT));
                }
                HeaderCells.Add(GetCell("\nItem Description", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Tender Type", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Customer \nor Vendor Name", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Time", DataFontBold, Element.ALIGN_LEFT));
                if (!isLayaway)
                {
                    HeaderCells.Add(GetCell("\nItem\nCost", DataFontBold, Element.ALIGN_RIGHT));
                    HeaderCells.Add(GetCell("Sale Amount", DataFontBold, Element.ALIGN_RIGHT));
                    HeaderCells.Add(GetCell("Sales Tax", DataFontBold, Element.ALIGN_RIGHT));
                    HeaderCells.Add(GetCell("Other Fees", DataFontBold, Element.ALIGN_RIGHT));
                    if (_title.Equals("Retail Sale Refunds"))
                    {
                        HeaderCells.Add(GetCell("Refund\nAmount", DataFontBold, Element.ALIGN_RIGHT));
                    }
                    else
                    {
                        HeaderCells.Add(GetCell("Retail\nAmount", DataFontBold, Element.ALIGN_RIGHT));
                    }
                }
                else
                {
                    HeaderCells.Add(GetCell("", DataFontBold, Element.ALIGN_RIGHT));
                    HeaderCells.Add(GetCell("Service Fee", DataFontBold, Element.ALIGN_RIGHT));
                    HeaderCells.Add(GetCell("Layaway Amount", DataFontBold, Element.ALIGN_RIGHT));
                }

                PdfPTable dataTable = new PdfPTable(HeaderCells.Count);

                if (dataTable.NumberOfColumns == 12)
                {
                    dataTable.SetWidths(new[] { 6f, 7f, 9f, 27f, 20f, 23f, 7f, 7f, 7f, 7f, 7f, 7f });
                }
                else
                {
                    dataTable.SetWidths(new[] { 6f, 9f, 27f, 20f, 23f, 7f, 7f, 7f, 7f });
                }

                AddGroupTitle(dataTable, _title);
                AddHeaderCells(dataTable);

                dataTable.HeaderRows = 2;

                PrintGroupDetail(dataTable);


                dataTable.AddCell(GetCell("Total", DataFont, Element.ALIGN_JUSTIFIED, 1, Rectangle.TOP_BORDER));
                dataTable.AddCell(GetCell(count.ToString(), DataFont, Element.ALIGN_LEFT, 1, Rectangle.TOP_BORDER));

                if (dataTable.NumberOfColumns == 12)
                {
                    dataTable.AddCell(GetCell("", DataFont, Element.ALIGN_RIGHT, 5, Rectangle.TOP_BORDER));
                    dataTable.AddCell(GetCell(GetCurrencyValue(total_cost), DataFont, Element.ALIGN_RIGHT, 1, Rectangle.TOP_BORDER));
                    dataTable.AddCell(GetCell(GetCurrencyValue(total), DataFont, Element.ALIGN_RIGHT, 1, Rectangle.TOP_BORDER));
                    dataTable.AddCell(GetCell(GetCurrencyValue(total_tax), DataFont, Element.ALIGN_RIGHT, 1, Rectangle.TOP_BORDER));
                    dataTable.AddCell(GetCell(GetCurrencyValue(total_fees), DataFont, Element.ALIGN_RIGHT, 1, Rectangle.TOP_BORDER));
                    dataTable.AddCell(GetCell(GetCurrencyValue(grandTotal), DataFont, Element.ALIGN_RIGHT, 1, Rectangle.TOP_BORDER));
                }
                else
                {
                    dataTable.AddCell(GetCell("", DataFont, Element.ALIGN_RIGHT, 5, Rectangle.TOP_BORDER));
                    dataTable.AddCell(GetCell(GetCurrencyValue(total_fees), DataFont, Element.ALIGN_RIGHT, 1, Rectangle.TOP_BORDER));
                    dataTable.AddCell(GetCell(GetCurrencyValue(total), DataFont, Element.ALIGN_RIGHT, 1, Rectangle.TOP_BORDER));
                }

                AddGroupContentsToPdfTable(dataTable);
            }
            catch (Exception ex)
            {
                ErrorText = ex.Message;
                ErrorCode = "1";
                throw;
            }
        }
        protected override void OnBuildSection()
        {
            try
            {
                if (GroupData.Rows.Count < 1)
                {
                    return;
                }

                // Header row
                HeaderCells.Add(GetCell("#", DataFontBold, Element.ALIGN_JUSTIFIED));
                HeaderCells.Add(GetCell("Transaction No.", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Transaction Type", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Gun No.", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Manufacturer", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Importer", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Model", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Serial No.", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Gun Type", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Caliber", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("Seizure No.", DataFontBold, Element.ALIGN_LEFT));
                HeaderCells.Add(GetCell("# of 4473 Forms", DataFontBold, Element.ALIGN_CENTER));

                PdfPTable dataTable = new PdfPTable(HeaderCells.Count);

                dataTable.SetWidths(new[] { 6f, 20f, 20f, 10f, 20f, 20f, 20f, 20f, 20f, 20f, 20f, 20f });
                AddGroupTitle(dataTable, "Gun Disposition Report");
                AddHeaderCells(dataTable);
                dataTable.HeaderRows = 2;


                PrintGroupDetail(dataTable);

                /*
                 * //dataTable.AddCell(GetCell("", DataFontBold, Element.ALIGN_JUSTIFIED, HeaderCells.Count));
                 * dataTable.AddCell(GetCell("Customer Name:", DataFontBold, Element.ALIGN_RIGHT, 2));
                 * dataTable.AddCell(GetCell(lastCust.name, DataFontBold, Element.ALIGN_LEFT, HeaderCells.Count - 2));
                 *
                 * //dataTable.AddCell(GetCell("", DataFontBold, Element.ALIGN_JUSTIFIED));
                 * dataTable.AddCell(GetCell("Address:", DataFontBold, Element.ALIGN_RIGHT, 2));
                 * dataTable.AddCell(GetCell(lastCust.addr, DataFontBold, Element.ALIGN_LEFT, HeaderCells.Count - 2));
                 *
                 * //dataTable.AddCell(GetCell("", DataFontBold, Element.ALIGN_JUSTIFIED));
                 * dataTable.AddCell(GetCell("ID:", DataFontBold, Element.ALIGN_RIGHT, 2));
                 * dataTable.AddCell(GetCell(lastCust.id, DataFontBold, Element.ALIGN_LEFT, HeaderCells.Count - 2));
                 *
                 * dataTable.AddCell(GetCell(PawnUtilities.String.StringUtilities.fillString("=", 200), DataFont, Element.ALIGN_CENTER, HeaderCells.Count));
                 * dataTable.AddCell(GetCell("", DataFontBold, Element.ALIGN_JUSTIFIED, HeaderCells.Count));
                 */

                dataTable.AddCell(GetCell(string.Format("{0} ATF 4473 Form(s)", nr_forms), DataFont, Element.ALIGN_LEFT, HeaderCells.Count));
                dataTable.AddCell(GetCell("", DataFontBold, Element.ALIGN_JUSTIFIED, HeaderCells.Count));
                dataTable.AddCell(GetCell("", DataFontBold, Element.ALIGN_JUSTIFIED, HeaderCells.Count));

                dataTable.AddCell(GetCell(@"This is a list of all outgoing gun transactions for one day.  Compare this list to your 4473 forms. 
Check for accuracy. Verify name, address and dates.  You should have one 4473 form for each transaction.", DataFont, Element.ALIGN_CENTER, HeaderCells.Count));
                AddGroupContentsToPdfTable(dataTable);
            }
            catch (Exception ex)
            {
                ErrorText = ex.Message;
                ErrorCode = "1";
                throw;
            }
        }