/// <summary>
        ///FunctionToFill ProductDetales
        /// </summary>
        /// <param name="strProduct"></param>
        /// <param name="inRowIndex"></param>
        /// <param name="strFillMode"></param>
        public void ProductDetailsFill(string strProduct, int inRowIndex, string strFillMode)
        {
            try
            {
                string barcode = string.Empty;
                decimal decCurrentConversionRate = 0;
                List<DataTable> listObj = new List<DataTable>();
                UnitConvertionBll bllUnitConversion = new UnitConvertionBll();
                SalesReturnBll bllSalesReturn = new SalesReturnBll();
                BatchBll BllBatch = new BatchBll();
                ProductCreationBll BllProductCreation = new ProductCreationBll();
                if (strFillMode == "dgvTextBarcode")
                {
                    listObj = bllSalesReturn.productviewbybarcodeforSR(strProduct, decSalesReturnVoucherTypeId);
                }
                if (strFillMode == "dgvTextProductName")
                {
                    listObj = BllProductCreation.ProductCodeViewByProductName(strProduct, decSalesReturnVoucherTypeId);
                }
                if (strFillMode == "dgvTextProductCode")
                {
                    listObj = BllProductCreation.ProductNameViewByProductCode(strProduct, decSalesReturnVoucherTypeId);
                }
                if (listObj[0].Rows.Count != 0)
                {
                    DGVGodownComboFill();

                    //  SerialNo();
                    dgvSalesReturn.Rows[inRowIndex].Cells["productId"].Value = listObj[0].Rows[0]["productId"];
                    decimal decProductId = Convert.ToDecimal(dgvSalesReturn.Rows[inRowIndex].Cells["productId"].Value.ToString());
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextBarcode"].Value = listObj[0].Rows[0]["barcode"];
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextProductCode"].Value = listObj[0].Rows[0]["productCode"];
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextProductName"].Value = listObj[0].Rows[0]["productName"];
                    // dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextQty"].Value = dtbl.Rows[0]["qty"];
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextQty"].Value = string.Empty;
                    UnitComboFill(decProductId, inRowIndex, dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbUnit"].ColumnIndex);
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbUnit"].Value = Convert.ToDecimal(listObj[0].Rows[0]["unitId"].ToString());
                    dgvSalesReturn.Rows[inRowIndex].Cells["unitConversionId"].Value = listObj[0].Rows[0]["unitConversionId"];
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbGodown"].Value = Convert.ToDecimal(listObj[0].Rows[0]["godownId"].ToString());
                    RackComboFill(Convert.ToDecimal(listObj[0].Rows[0]["godownId"].ToString()), inRowIndex, dgvSalesReturn.CurrentRow.Cells["dgvCmbRack"].ColumnIndex);
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbRack"].Value = Convert.ToDecimal(listObj[0].Rows[0]["rackId"].ToString());
                    BatchComboFill(decProductId, inRowIndex, dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbBatch"].ColumnIndex);
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbBatch"].Value = Convert.ToDecimal(listObj[0].Rows[0]["batchId"].ToString());
                    decimal decBatchId = Convert.ToDecimal(dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbBatch"].Value.ToString());
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextRate"].Value = Math.Round(Convert.ToDecimal(listObj[0].Rows[0]["salesRate"].ToString()), PublicVariables._inNoOfDecimalPlaces);
                    getProductRate(inRowIndex, decProductId, decBatchId);
                    TaxGridFill();
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbTax"].Value = Convert.ToDecimal(listObj[0].Rows[0]["taxId"].ToString());
                    dgvSalesReturn.Rows[inRowIndex].Cells["conversionRate"].Value = listObj[0].Rows[0]["conversionRate"];
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextDiscountPercentage"].Value = listObj[0].Rows[0]["discountPercent"].ToString();
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextDiscountAmount"].Value = Math.Round(Convert.ToDecimal(listObj[0].Rows[0]["discount"]), PublicVariables._inNoOfDecimalPlaces);
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextDiscountAmount"].ReadOnly = true;
                    dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextNetValue"].Value = Math.Round(Convert.ToDecimal(listObj[0].Rows[0]["netvalue"]), PublicVariables._inNoOfDecimalPlaces);
                    GrossValueCalculation(inRowIndex);
                    DiscountCalculationfordiscountpercentage(inRowIndex, 12);
                    DiscountCalculation(inRowIndex, 13);
                    TotalAmountCalculation();
                    TaxAmountCalculation(inRowIndex);
                    taxamountfill();
                    CessTaxamountCalculation();
                    TotalBillTaxCalculation();
                    TotalTaxAmtCalculation();
                    GrandTotalCalculation();
                    taxAndGridTotalAmountCalculation(inRowIndex);
                    decCurrentConversionRate = Convert.ToDecimal(listObj[0].Rows[0]["conversionRate"].ToString());
                    dgvSalesReturn.Rows[inRowIndex].HeaderCell.Value = "X";
                    dgvSalesReturn.Rows[inRowIndex].HeaderCell.Style.ForeColor = Color.Red;
                }
                else
                {
                    if (dgvSalesReturn.CurrentRow.Index < dgvSalesReturn.RowCount - 1)
                    {
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextBarcode"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextProductCode"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextProductName"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextQty"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbUnit"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbGodown"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbBatch"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbRack"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextRate"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvCmbTax"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextDiscountPercentage"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextDiscountAmount"].Value = string.Empty;
                        dgvSalesReturn.Rows[inRowIndex].Cells["dgvTextNetValue"].Value = string.Empty;
                    }
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show("SR74" + ex.Message, "openmiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }