protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
        {
            var parent = this.OwningColumn as CustomDataGridViewIcnColumn;

            if (parent == null)
            {
                base.Paint(graphics, clipBounds, cellBounds, rowIndex, cellState, value, formattedValue, errorText, cellStyle, advancedBorderStyle, paintParts);
                return;
            }

            var drawingContext = new CellDrawingContext
            {
                BackColor        = cellStyle.BackColor,
                ForeColor        = cellStyle.ForeColor,
                Graphics         = graphics,
                CellBounds       = cellBounds,
                PreviousTextSize = new SizeF(0, 0),
                TextSize         = new SizeF(0, 0),
                TextStart        = new PointF(cellBounds.X, ((cellBounds.Height - cellBounds.Height) / 2.0f))
            };


            if ((cellState & DataGridViewElementStates.Selected) == DataGridViewElementStates.Selected)
            {
                drawingContext.BackColor = cellStyle.SelectionBackColor;
                drawingContext.ForeColor = cellStyle.SelectionForeColor;
            }
            using (Brush backColorBrush = new SolidBrush(drawingContext.BackColor))
            {
                graphics.FillRectangle(backColorBrush, cellBounds);
            }

            base.PaintBorder(graphics, clipBounds, cellBounds, cellStyle, advancedBorderStyle);

            Font font     = cellStyle.Font;
            var  boldFont = new Font(font, FontStyle.Bold);

            string cellText = formattedValue == null ? string.Empty : formattedValue.ToString();

            var icn = new Icn(cellText);

            if (!icn.Initialized)
            {
                return;
            }

            DrawText(drawingContext, font, icn.FormattedShopNumber + " " + icn.FormattedLastDigitOfYear + " ");
            DrawText(drawingContext, boldFont, icn.FormattedDocumentNumber);
            DrawText(drawingContext, font, " " + icn.FormattedDocumentType + " ");
            DrawText(drawingContext, boldFont, icn.FormattedItemNumber);
            DrawText(drawingContext, font, " " + icn.FormattedSubItemNumber);

            drawingContext.OverallWidth += 8; // add a little padding

            if (drawingContext.OverallWidth > parent.Width)
            {
                parent.Width = drawingContext.OverallWidth;
            }
        }
 public static DataSet getVendorDataForIcn(Icn icn)
 {
     return(getDataSet("PAWN_Inquiries", "get_Vendor_for_icn",
                       new List <OracleProcParam>
     {
         new OracleProcParam("p_icn", icn.GetFullIcn())
     },
                       new Dictionary <string, string>
     {
         { "o_revisions", "REVISIONS" }
     }));
 }
 public static DataSet getItemDescRevision(Icn icn)
 {
     return(getDataSet("PAWN_Inquiries", "get_item_desc_revision",
                       new List <OracleProcParam>
     {
         new OracleProcParam("p_icn", icn.GetFullIcn())
     },
                       new Dictionary <string, string>
     {
         { "o_revisions", "REVISIONS" }
     }));
 }
        public static DataSet getMinPurchaseData(Icn icn)
        {
            return(getDataSet("PAWN_Inquiries", "get_min_purchase_data",
                              new List <OracleProcParam>
            {
                new OracleProcParam("p_storenumber", (icn.ShopNumber == -1) ? "" : icn.ShopNumber.ToString()),
                new OracleProcParam("p_ticket_number", (icn.DocumentNumber == -1) ? "" : icn.DocumentNumber.ToString()),

                new OracleProcParam("o_date_made", OracleDbType.Date, DBNull.Value, ParameterDirection.Output, 1),
                new OracleProcParam("o_purchase_amount", OracleDbType.Decimal, DBNull.Value, ParameterDirection.Output, 1),
                new OracleProcParam("o_purchase_status", OracleDbType.Varchar2, DBNull.Value, ParameterDirection.Output, 32),
            },
                              null));
        }
        private void ReprintTag_Load(object sender, EventArgs e)
        {
            if (Item == null)
            {
                btnComplete.Enabled = false;
                return;
            }

            Icn icn = new Icn(Item.Icn);

            lblDocType.Text         = ((int)icn.DocumentType).ToString();
            lblIcn.Text             = icn.GetFullIcn();
            txtItemDescription.Text = Item.TicketDescription;
            lblRetailPrice.Text     = Item.RetailPrice.ToString("c");
            lblStatus.Text          = Item.ItemStatus.ToString();
            lblTicketNumber.Text    = icn.DocumentNumber.ToString();
        }
        private bool isCACC(string icn)
        {
            bool retval = false;

            Icn thisIcn = new Icn();

            thisIcn.ParseIcn(icn);


            if (thisIcn.DocumentNumber == 3362 || thisIcn.DocumentNumber == 3363 ||
                thisIcn.DocumentNumber == 3350 || thisIcn.DocumentNumber == 3262 ||
                thisIcn.DocumentNumber == 3380)
            {
                retval = true;
            }

            return(retval);
        }
示例#7
0
        private void RetailItemPricingHistory_Load(object sender, EventArgs e)
        {
            Icn icn = new Icn(RetailItem.Icn);

            lblCreationDateValue.Text = RetailItem.Md_Date.ToString("d");
            txtDescription.Text       = RetailItem.TicketDescription;
            lblGunNumberValue.Text    = RetailItem.GunNumber.ToString();
            lblIcnValue.Text          = RetailItem.Icn;
            lblManufacturerValue.Text = GetStringValue(QuickInformation.Manufacturer);
            lblModelValue.Text        = GetStringValue(QuickInformation.Model);
            lblNewRetailValue.Text    = RetailItem.RetailPrice.ToString("c");
            lblPfiDateValue.Text      = RetailItem.PfiDate.ToString("d");
            lblQuantityValue.Text     = RetailItem.Quantity.ToString();
            lblSerialValue.Text       = (RetailItem.SerialNumber == null || RetailItem.SerialNumber.Count == 0) ? string.Empty : RetailItem.SerialNumber[0];
            lblShortCodeValue.Text    = icn.GetShortCode();
            lblStatusValue.Text       = RetailItem.ItemStatus.ToString();
            lblWeightValue.Text       = QuickInformation.Weight.ToString();

            LoadRaiseHistory();
        }
        private void PrintDetailRow(TransferItemVO vo, PdfPTable table, int row)
        {
            PdfPCell cell;
            decimal  totalCost = 0.0m;

            if (Convert.ToInt32(vo.ICNQty) > 0 && vo.ItemCost > 0.0m)
            {
                totalCost = Convert.ToInt32(vo.ICNQty) * vo.ItemCost;
            }
            cell = new PdfPCell(new Paragraph(row.ToString(), _reportFont));
            //cell.Border = Rectangle.NO_BORDER;
            cell.HorizontalAlignment = Element.ALIGN_LEFT;
            cell.VerticalAlignment   = Element.ALIGN_TOP;
            table.AddCell(cell);
            Icn    icn          = new Icn(vo.ICN);
            string icnShortCode = icn.GetShortCode();

            if (_catcoTransferType == "Scrap")
            {
                cell = new PdfPCell(new Paragraph(icnShortCode, ReportFontBold));
                //cell.Border = Rectangle.NO_BORDER;
                cell.HorizontalAlignment = Element.ALIGN_LEFT;
                cell.Colspan             = 1;
                cell.VerticalAlignment   = Element.ALIGN_TOP;
                table.AddCell(cell);

                cell = new PdfPCell(new Paragraph(vo.ItemDescription, _reportFont));
                //cell.Border = Rectangle.NO_BORDER;
                cell.HorizontalAlignment = Element.ALIGN_LEFT;
                cell.Colspan             = 3;
                cell.VerticalAlignment   = Element.ALIGN_TOP;
                table.AddCell(cell);
            }
            else if (_catcoTransferType == "Refurb")
            {
                cell = new PdfPCell(new Paragraph(vo.RefurbNumber.ToString(), _reportFont));
                cell.HorizontalAlignment = Element.ALIGN_LEFT;
                cell.VerticalAlignment   = Element.ALIGN_TOP;
                table.AddCell(cell);

                cell = new PdfPCell(new Paragraph(icnShortCode, ReportFontBold));
                //cell.Border = Rectangle.NO_BORDER;
                cell.HorizontalAlignment = Element.ALIGN_LEFT;
                cell.Colspan             = 1;
                cell.VerticalAlignment   = Element.ALIGN_TOP;
                table.AddCell(cell);

                cell = new PdfPCell(new Paragraph(vo.ItemDescription, _reportFont));
                //cell.Border = Rectangle.NO_BORDER;
                cell.HorizontalAlignment = Element.ALIGN_LEFT;
                cell.Colspan             = 3;
                cell.VerticalAlignment   = Element.ALIGN_TOP;
                table.AddCell(cell);
            }
            else
            {
                cell = new PdfPCell(new Paragraph(icnShortCode, ReportFontBold));
                //cell.Border = Rectangle.NO_BORDER;
                cell.HorizontalAlignment = Element.ALIGN_LEFT;
                cell.Colspan             = 1;
                cell.VerticalAlignment   = Element.ALIGN_TOP;
                table.AddCell(cell);


                cell = new PdfPCell(new Paragraph(vo.ItemDescription, _reportFont));
                //cell.Border = Rectangle.NO_BORDER;
                cell.HorizontalAlignment = Element.ALIGN_LEFT;
                cell.Colspan             = 3;
                cell.VerticalAlignment   = Element.ALIGN_TOP;
                table.AddCell(cell);
            }

            //cell.Border = Rectangle.NO_BORDER;
            if (_catcoTransferType != "Refurb")
            {
                cell = new PdfPCell(new Paragraph(vo.ICNQty, _reportFont));
                //cell.Border = Rectangle.NO_BORDER;
                cell.HorizontalAlignment = Element.ALIGN_LEFT;
                cell.VerticalAlignment   = Element.ALIGN_TOP;
                table.AddCell(cell);
            }

            cell = new PdfPCell(new Paragraph(String.Format("{0:C}", vo.ItemCost), _reportFont));
            //cell.Border = Rectangle.NO_BORDER;
            cell.HorizontalAlignment = Element.ALIGN_LEFT;
            cell.VerticalAlignment   = Element.ALIGN_TOP;
            table.AddCell(cell);

            cell = new PdfPCell(new Paragraph(String.Format("{0:C}", totalCost), _reportFont));
            //cell.Border = Rectangle.NO_BORDER;
            cell.HorizontalAlignment = Element.ALIGN_LEFT;
            cell.VerticalAlignment   = Element.ALIGN_TOP;
            table.AddCell(cell);
        }
        private void PopulateUnboundData()
        {
            try
            {
                var loc_aisle = string.Empty;
                var loc_shelf = string.Empty;

                if (!(_thisItem[_rowNum].Row["LOC_AISLE"] is System.DBNull))
                {
                    loc_aisle = string.Format("aisle:{0} ", _thisItem[_rowNum].Row["LOC_AISLE"]);
                }

                if (!(_thisItem[_rowNum].Row["LOC_SHELF"] is System.DBNull))
                {
                    loc_shelf = string.Format("shelf:{0} ", _thisItem[_rowNum].Row["LOC_SHELF"]);
                }

                loctn.Text = string.Format("{0} {1}  {2}", loc_aisle, loc_shelf, _thisItem[_rowNum].Row["LOCATION"]);

                if (useDefaultBinding)
                {
                    return;
                }

                //-----------------------------------------------------------------------------------------------
                String icn       = _thisItem[this._rowNum]["ICN"].ToString();
                Icn    icnObject = new Icn(icn.Replace(" ", ""));

                if (icnObject.DocumentType == DocumentType.MerchandisePurchaseReceipt &&
                    _thisItem[this._rowNum]["PURCH_TYPE"].ToString() == "V")
                {
                    showingCustomerMdse = false;
                }
                else
                {
                    showingCustomerMdse = true;
                }

                if (missingCustomerVendorData && showingCustomerMdse)
                {
                    Object o = _thisItem[this._rowNum]["CUSTOMERNUMBER"];
                    if (o != System.DBNull.Value)
                    {
                        String custNumber = (String)_thisItem[this._rowNum]["CUSTOMERNUMBER"];

                        if (custNumber.Length != 0)
                        {
                            CustomerVO custObject = CustomerProcedures.getCustomerDataByCustomerNumber(GlobalDataAccessor.Instance.DesktopSession, custNumber);

                            cust_vendor_no.Text = custNumber;
                            if (custObject != null)
                            {
                                cust_name.Text = custObject.CustomerName;

                                if (custObject.CustomerIDs.Count != 0)
                                {
                                    cust_id.Text = custObject.CustomerIDs[0].IdValue;
                                }
                                else
                                {
                                    cust_id.Text = "";
                                }

                                cust_vendor_since.Text = custObject.CustomerSince.ToShortDateString();
                                cust_vendor_dob.Text   = custObject.DateOfBirth.ToShortDateString();
                            }
                        }
                    }
                    else
                    {
                        cust_vendor_no.Text    = "Unknown";
                        cust_id.Text           = "Unknown";
                        cust_name.Text         = "Unknown";
                        cust_vendor_since.Text = "Unknown";
                        cust_vendor_dob.Text   = "Unknown";

                        //CommonUI.DesktopProcedures.ProcedureUtilities..RetailProcedures.
                    }
                }
                else if (missingCustomerVendorData && !showingCustomerMdse)
                {
                    cust_vendor_no.Text    = "Unknown";
                    cust_id.Text           = "Unknown";
                    cust_name.Text         = "Unknown";
                    cust_vendor_since.Text = "Unknown";
                    cust_vendor_dob.Text   = "Unknown";

                    DataSet ds = InventoryInquiries.getVendorDataForIcn(icnObject);

                    if (!ds.IsNullOrEmpty() && ds.Tables.Contains("REVISIONS"))
                    {
                        // Get output number
                        DataTable outputDt = ds.Tables["REVISIONS"];

                        if (outputDt != null && outputDt.IsInitialized &&
                            outputDt.Rows != null && outputDt.Rows.Count > 0)
                        {
                            cust_name.Text = outputDt.Rows[0]["VENDOR_NAME"].ToString();
                            cust_id.Text   = outputDt.Rows[0]["VENDOR_ID"].ToString();
                            DateTime dt = DateTime.Parse(outputDt.Rows[0]["EFFECTIVE_DATE"].ToString());
                            cust_vendor_since.Text = dt.ToShortDateString();
                            cust_vendor_no.Text    = outputDt.Rows[0]["TAX_ID"].ToString();
                        }
                    }
                }

                if (missingMdseData)
                {
                    System.Diagnostics.Debug.Assert(false, "Missing MDSE data. Need to load from Oracle.");
                }

                if (missingPawnData)
                {
                    org_date_time.Text        = "Unknown";
                    loan_purchase_amount.Text = "Unknown";
                    status_cd.Text            = "Unknown";

                    cur_loan_nr.Text = _thisItem[this._rowNum]["TICKET_NUMBER"].ToString();

                    DataSet ds = InventoryInquiries.getMinPawnData(new Icn(icn.Replace(" ", "")));

                    if (!ds.IsNullOrEmpty() && ds.Tables.Contains("OUTPUT"))
                    {
                        //Get output number
                        DataTable outputDt = ds.Tables["OUTPUT"];

                        if (outputDt != null && outputDt.IsInitialized &&
                            outputDt.Rows != null && outputDt.Rows.Count > 0)
                        {
                            DataRow dr = outputDt.Rows[0];
                            if (dr != null && dr.ItemArray.Length > 0)
                            {
                                object o_date_made = dr.ItemArray.GetValue(1);
                                if ((String)o_date_made != "null")
                                {
                                    String   day   = o_date_made.ToString().Substring(0, 2);
                                    String   year  = o_date_made.ToString().Substring(7, 2);
                                    String   month = o_date_made.ToString().Substring(3, 3);
                                    DateTime dt    = DateTime.Parse(month + " " + day + " " + year);
                                    this.org_date_time.Text = dt.ToShortDateString();
                                }
                            }

                            dr = outputDt.Rows[1];
                            if (dr != null && dr.ItemArray.Length > 0)
                            {
                                object o_loan_amount = dr.ItemArray.GetValue(1);
                                if (o_loan_amount != null)
                                {
                                    Decimal loan = Decimal.Parse((string)o_loan_amount);
                                    this.loan_purchase_amount.Text = "$" + loan.ToString();
                                }
                            }

                            dr = outputDt.Rows[2];
                            if (dr != null && dr.ItemArray.Length > 0)
                            {
                                object o_loan_status = dr.ItemArray.GetValue(1);
                                if ((String)o_loan_status != "null")
                                {
                                    String status = (string)o_loan_status;
                                    this.status_cd.Text = status;
                                }
                            }
                        }
                    }
                    else
                    {
                        // no Pawn data, assume if it is a purchase
                        showingLoan = false;

                        //cur_loan_nr.Text = _thisItem[this._rowNum]["TICKET_NUMBER"].ToString();

                        ds = InventoryInquiries.getMinPurchaseData(new Icn(icn.Replace(" ", "")));

                        if (!ds.IsNullOrEmpty())
                        {
                            //Get output number
                            DataTable outputDt = ds.Tables["OUTPUT"];

                            if (outputDt != null && outputDt.IsInitialized &&
                                outputDt.Rows != null && outputDt.Rows.Count > 0)
                            {
                                DataRow dr = outputDt.Rows[0];
                                if (dr != null && dr.ItemArray.Length > 0)
                                {
                                    object o_date_made = dr.ItemArray.GetValue(1);
                                    if ((String)o_date_made != "null")
                                    {
                                        String   day   = o_date_made.ToString().Substring(0, 2);
                                        String   year  = o_date_made.ToString().Substring(7, 2);
                                        String   month = o_date_made.ToString().Substring(3, 3);
                                        DateTime dt    = DateTime.Parse(month + " " + day + " " + year);
                                        this.org_date_time.Text = dt.ToShortDateString();
                                    }
                                }

                                dr = outputDt.Rows[1];
                                if (dr != null && dr.ItemArray.Length > 0)
                                {
                                    object o_loan_amount = dr.ItemArray.GetValue(1);
                                    if (o_loan_amount != null)
                                    {
                                        Decimal loan = Decimal.Parse((string)o_loan_amount);
                                        this.loan_purchase_amount.Text = "$" + loan.ToString();
                                    }
                                }

                                dr = outputDt.Rows[2];
                                if (dr != null && dr.ItemArray.Length > 0)
                                {
                                    object o_loan_status = dr.ItemArray.GetValue(1);
                                    if ((String)o_loan_status != "null")
                                    {
                                        String status = (string)o_loan_status;
                                        this.status_cd.Text = status;
                                    }
                                }
                            }
                        }
                    }
                }

                if (showingCustomerMdse)
                {
                    labelCustomerVendorNumber.Text = "Customer #:";

                    labelCustomerVendorDOB.Text    = "DOB:";
                    labelCustomerVendorDOB.Visible = true;
                    cust_vendor_dob.Visible        = true;

                    labelCustomerVendorSince.Text = "Customer Since:";
                }
                else
                {
                    labelCustomerVendorNumber.Text = "Vendor #";

                    labelCustomerVendorDOB.Visible = false;
                    cust_vendor_dob.Visible        = false;

                    labelCustomerVendorSince.Text = "Vendor Since:";
                }

                if (showingLoan)
                {
                    labelLoanPurchaseAmount.Text = "Loan Amount:";
                }
                else
                {
                    labelLoanPurchaseAmount.Text = "Purchase Amount:";
                }
            }
            catch (Exception ex)
            {
                int i = 0;
            }
        }
        private bool IsCaccOrNxt()
        {
            var icn = new Icn(Item.Icn);

            return(icn.DocumentType == DocumentType.CaccItem || icn.DocumentType == DocumentType.NxtAndStandardDescriptor);
        }
        private void Setup()
        {
            //gvMerchandise.AutoGenerateColumns = false;
            //gvMerchandise.DataSource = SearchItems;
            foreach (RetailItem item in SearchItems)
            {
                int             gvIdx = gvMerchandise.Rows.Add();
                DataGridViewRow myRow = gvMerchandise.Rows[gvIdx];
                //string icn = i.Icn;
                myRow.Cells[colICN.Name].Value = item.Icn;
                myRow.Cells[colMerchandiseDescription.Name].Value = item.TicketDescription;
                string itemStatus;
                if (!string.IsNullOrEmpty(item.HoldType))
                {
                    itemStatus = item.ItemStatus + "-" + item.HoldType;
                }
                else
                {
                    itemStatus = item.ItemStatus.ToString();
                }
                myRow.Cells[colStatus.Name].Value      = itemStatus;
                myRow.Cells[colRetailPrice.Name].Value = item.RetailPrice.ToString("c");
                Icn icn = new Icn(item.Icn);
                if (ResultsMode == ItemSearchResultsMode.RETAIL_SALE || ResultsMode == ItemSearchResultsMode.CHARGEOFF)
                {
                    if (item.ItemStatus != ProductStatus.PFI)
                    {
                        myRow.DefaultCellStyle.BackColor = Color.Gray;
                        myRow.ReadOnly = true;
                    }
                    if (item.HoldType == HoldTypes.POLICEHOLD.ToString())
                    {
                        if (SearchItems.Count == 1 && ResultsMode == ItemSearchResultsMode.RETAIL_SALE)
                        {
                            lblError.Text = "The item number entered is not eligible for retail sale or layaway.";
                        }
                        myRow.DefaultCellStyle.BackColor = Color.Gray;
                        myRow.ReadOnly = true;
                    }
                }

                if (!AllowSubitemSelection)
                {
                    if (icn.DocumentType == DocumentType.CaccItem || icn.DocumentType == DocumentType.NxtAndStandardDescriptor || item.HoldType == HoldTypes.POLICEHOLD.ToString() || icn.SubItemNumber != 0)
                    {
                        myRow.DefaultCellStyle.BackColor = Color.Gray;
                        myRow.ReadOnly = true;
                    }
                }
                myRow.Tag = item;
            }

            if (ResultsMode == ItemSearchResultsMode.RETAIL_SALE && ShowAsIneligibleSingleItem)
            {
                continueButton.Visible = false;
                cancelButton.Location  = continueButton.Location;
                cancelButton.Text      = "OK";
                titleLabel.Text        = "Item Search Result";
            }

            btnTempICN.Visible = ResultsMode == ItemSearchResultsMode.RETAIL_SALE;
        }
示例#12
0
 public void TestShortCodeSingleItemNumber()
 {
     Icn = new Icn("5293.1");
     Assert.IsTrue(Icn.Initialized);
 }
        private void WriteDetail(PdfPTable detailsTable, int tableColumnsSpan)
        {
            int rowCount = 1;

            foreach (ReportObject.GunAuditATFOpenRecords GunAuditATFOpenRecord in ReportObject.GunAuditDataATFOpenRecordsData)
            {
                //if (rowCount <= 20)
                //{
                Icn    icn          = new Icn(GunAuditATFOpenRecord.ICN);
                string icnShortCode = icn.GetShortCode();
                if (rowCount % 2 == 0)
                {
                    WriteCell(detailsTable, GunAuditATFOpenRecord.GunNumber.ToString(), ReportFontMedium, 1, Element.ALIGN_LEFT, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.Manufacturer, ReportFontMedium, 2, Element.ALIGN_LEFT, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.Importer, ReportFontMedium, 1, Element.ALIGN_LEFT, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.Model, ReportFontMedium, 1, Element.ALIGN_LEFT, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.SerialNumber, ReportFontMedium, 1, Element.ALIGN_LEFT, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.GaugeOrCaliber, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.GunType, ReportFontMedium, 1, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, icnShortCode, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);

                    /*PdfPCell cell;
                     * cell = GetFormattedICNCellSmallFont(GunAuditATFOpenRecord.ICN);
                     * cell.HorizontalAlignment = Rectangle.ALIGN_RIGHT;
                     * cell.Border = Rectangle.NO_BORDER;
                     * cell.BackgroundColor = new BaseColor(System.Drawing.Color.LightGray);
                     * cell.Colspan = 2;
                     * cell.VerticalAlignment = Element.ALIGN_TOP;
                     * detailsTable.AddCell(cell);*/
                    //WriteCell(detailsTable, GunAuditATFOpenRecord.ICN, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    if (GunAuditATFOpenRecord.HoldType == "POLICEHOLD")
                    {
                        WriteCell(detailsTable, GunAuditATFOpenRecord.TransactionNumber + " - " + GunAuditATFOpenRecord.Status + " - " + GunAuditATFOpenRecord.HoldDesc, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    }
                    else
                    {
                        WriteCell(detailsTable, GunAuditATFOpenRecord.TransactionNumber + " - " + GunAuditATFOpenRecord.Status, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    }

                    WriteCell(detailsTable, GunAuditATFOpenRecord.LocationAisle, ReportFontMedium, 1, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.Shelf, ReportFontMedium, 1, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.Location, ReportFontMedium, 1, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.GunDate.ToShortDateString(), ReportFontMedium, 1, Element.ALIGN_RIGHT, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.CustomerName, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.CustomerAddress, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);

                    //write id and address
                    WriteCell(detailsTable, string.Empty, ReportFontMedium, 17, Element.ALIGN_RIGHT, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.CustomerID, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.CustomerAddress1, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER, true);
                    WriteCell(detailsTable, string.Empty, ReportFontMedium, tableColumnsSpan, Element.ALIGN_RIGHT, Rectangle.NO_BORDER, true);
                }
                else
                {
                    WriteCell(detailsTable, GunAuditATFOpenRecord.GunNumber.ToString(), ReportFontMedium, 1, Element.ALIGN_LEFT, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.Manufacturer, ReportFontMedium, 2, Element.ALIGN_LEFT, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.Importer, ReportFontMedium, 1, Element.ALIGN_LEFT, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.Model, ReportFontMedium, 1, Element.ALIGN_LEFT, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.SerialNumber, ReportFontMedium, 1, Element.ALIGN_LEFT, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.GaugeOrCaliber, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.GunType, ReportFontMedium, 1, Element.ALIGN_CENTER, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, icnShortCode, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER);

                    /*PdfPCell cell;
                     * cell = GetFormattedICNCellSmallFont(GunAuditATFOpenRecord.ICN);
                     * cell.HorizontalAlignment = Rectangle.ALIGN_RIGHT;
                     * cell.Border = Rectangle.NO_BORDER;
                     *
                     * cell.Colspan = 2;
                     * cell.VerticalAlignment = Element.ALIGN_TOP;
                     * detailsTable.AddCell(cell);*/
                    // WriteCell(detailsTable, GunAuditATFOpenRecord.ICN, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER);

                    if (GunAuditATFOpenRecord.HoldType == "POLICEHOLD")
                    {
                        WriteCell(detailsTable, GunAuditATFOpenRecord.TransactionNumber + " - " + GunAuditATFOpenRecord.Status + " - " + GunAuditATFOpenRecord.HoldDesc, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER);
                    }
                    else
                    {
                        WriteCell(detailsTable, GunAuditATFOpenRecord.TransactionNumber + " - " + GunAuditATFOpenRecord.Status, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER);
                    }
                    WriteCell(detailsTable, GunAuditATFOpenRecord.LocationAisle, ReportFontMedium, 1, Element.ALIGN_CENTER, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.Shelf, ReportFontMedium, 1, Element.ALIGN_CENTER, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.Location, ReportFontMedium, 1, Element.ALIGN_CENTER, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.GunDate.ToShortDateString(), ReportFontMedium, 1, Element.ALIGN_RIGHT, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.CustomerName, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.CustomerAddress, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER);

                    //write id and address
                    WriteCell(detailsTable, string.Empty, ReportFontMedium, 17, Element.ALIGN_RIGHT, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.CustomerID, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, GunAuditATFOpenRecord.CustomerAddress1, ReportFontMedium, 2, Element.ALIGN_CENTER, Rectangle.NO_BORDER);
                    WriteCell(detailsTable, string.Empty, ReportFontMedium, tableColumnsSpan, Element.ALIGN_RIGHT, Rectangle.NO_BORDER);
                }
                //}
                rowCount++;
                _totalNumGuns++;
            }
        }