/// <summary>
 /// Function for Barcode Printing GrideFill
 /// </summary>
 public void BarcodePrintingGrideFill()
 {
     BatchBll BllBatch = new BatchBll();
     try
     {
         if (cmbProductCode.SelectedIndex != -1)
         {
             if (cmbProductCode.SelectedValue.ToString() != "System.Data.DataRowView" && cmbProductCode.Text != "System.Data.DataRowView")
             {
                 if (cmbBatch.SelectedIndex != -1)
                 {
                     if (cmbBatch.SelectedValue.ToString() != "System.Data.DataRowView" && cmbBatch.Text != "System.Data.DataRowView")
                     {
                         if (cmbPurchaseInvoiceNo.SelectedIndex != -1)
                         {
                             if (cmbPurchaseInvoiceNo.SelectedValue.ToString() != "System.Data.DataRowView" && cmbPurchaseInvoiceNo.Text != "System.Data.DataRowView")
                             {
                                 dgvBarcodePrinting.Rows.Clear();
                                 listBarcodePrinting = BllBatch.BarcodePrintingGrideFill(Convert.ToDecimal(cmbProductCode.SelectedValue.ToString()), Convert.ToDecimal(cmbBatch.SelectedValue.ToString()), Convert.ToDecimal(cmbPurchaseInvoiceNo.SelectedValue.ToString()));
                                 foreach (DataRow item in listBarcodePrinting[0].Rows)
                                 {
                                     dgvBarcodePrinting.Rows.Add();
                                     dgvBarcodePrinting.Rows[dgvBarcodePrinting.Rows.Count - 1].Cells["dgvProductCode"].Value = item["productCode"].ToString();
                                     dgvBarcodePrinting.Rows[dgvBarcodePrinting.Rows.Count - 1].Cells["dgvProductName"].Value = item["productName"].ToString();
                                     dgvBarcodePrinting.Rows[dgvBarcodePrinting.Rows.Count - 1].Cells["dgvBatch"].Value = item["batchNo"].ToString();
                                     dgvBarcodePrinting.Rows[dgvBarcodePrinting.Rows.Count - 1].Cells["dgvBarcode"].Value = item["barcode"].ToString();
                                     dgvBarcodePrinting.Rows[dgvBarcodePrinting.Rows.Count - 1].Cells["dgvCurrentStock"].Value = item["CurrentStock"].ToString();
                                     dgvBarcodePrinting.Rows[dgvBarcodePrinting.Rows.Count - 1].Cells["dgvMRP"].Value = Math.Round(Convert.ToDecimal(item["mrp"].ToString()), PublicVariables._inNoOfDecimalPlaces);
                                     dgvBarcodePrinting.Rows[dgvBarcodePrinting.Rows.Count - 1].Cells["dgvCopies"].Value = 0;
                                     dgvBarcodePrinting.Rows[dgvBarcodePrinting.Rows.Count - 1].Cells["dgvPurchaseRate"].Value = item["purchaseRate"].ToString();
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("BCP9:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }