/// <summary>
 /// Function to use the cess and tax amount calculation
 /// </summary>
 public void CessTaxamountCalculation()
 {
     try
     {
         List<DataTable> ListObj = new List<DataTable>();
         TaxBll bllTax = new TaxBll();
         decTotalCessTaxamount = 0;
         decimal decCessamount = 0;
         foreach (DataGridViewRow drowDetails in dgvSalesReturn2.Rows)
         {
             if (drowDetails.Cells["dgvTextTaxId"].Value != null)
             {
                 ListObj = bllTax.TaxIdCorrespondingToCessTaxId(Convert.ToDecimal(drowDetails.Cells["dgvTextTaxId"].Value.ToString()));
                 foreach (DataRow item in ListObj[0].Rows)
                 {
                     if (item["selectedTaxId"].ToString() != String.Empty)
                     {
                         foreach (DataGridViewRow drowDetails1 in dgvSalesReturn2.Rows)
                         {
                             if (drowDetails1.Cells["dgvTextTaxId"].Value != null)
                             {
                                 if (drowDetails1.Cells["dgvTextTaxId"].Value.ToString() == item["selectedTaxId"].ToString())
                                 {
                                     drowDetails.Cells["dgvTextAmount"].Value = Math.Round((Convert.ToDecimal(drowDetails1.Cells["dgvTextAmount"].Value.ToString()) * Convert.ToDecimal(drowDetails.Cells["dgvRate"].Value.ToString())) / 100, PublicVariables._inNoOfDecimalPlaces);
                                     decCessamount = Convert.ToDecimal(drowDetails.Cells["dgvTextAmount"].Value.ToString());
                                     decTotalCessTaxamount = Math.Round(decTotalCessTaxamount + decCessamount, PublicVariables._inNoOfDecimalPlaces);
                                     drowDetails.Cells["dgvTextAmount"].Value = decTotalCessTaxamount;
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SR66:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }