/// <summary> /// Total amount calculation /// </summary> public void TotalBillTaxCalculation() { try { TaxBll bllTax = new TaxBll(); List<DataTable> ListObj = new List<DataTable>(); ListObj = bllTax.TotalBillTaxCalculationBtapplicableOn(); foreach (DataRow drowItem in ListObj[0].Rows) { if (drowItem != null) { foreach (DataGridViewRow dgvrItem in dgvSalesReturn2.Rows) { if (dgvrItem.Cells["dgvTextTaxId"].Value != null) { if (dgvrItem.Cells["dgvTextTaxId"].Value.ToString() == drowItem["taxId"].ToString()) { if (txtTotalAmount.Text != string.Empty) { dgvrItem.Cells["dgvTextAmount"].Value = Math.Round((Convert.ToDecimal(drowItem["rate"].ToString()) * Convert.ToDecimal(txtTotalAmount.Text)) / 100, PublicVariables._inNoOfDecimalPlaces); decTotalBillTaxAmount = Math.Round(Convert.ToDecimal(dgvrItem.Cells["dgvTextAmount"].Value.ToString()), PublicVariables._inNoOfDecimalPlaces); } } } } } } } catch (Exception ex) { MessageBox.Show("SR19:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }