/// <summary> /// Function to use the tax gridfill /// </summary> public void DGVSalesReturn2Fill() { try { List<DataTable> ListObj = new List<DataTable>(); TaxBll bllTax = new TaxBll(); ListObj = bllTax.TaxViewAllByVoucherTypeIdWithCess(decSalesReturnVoucherTypeId); dgvSalesReturn2.Rows.Clear(); foreach (DataRow drowDetails in ListObj[0].Rows) { dgvSalesReturn2.Rows.Add(); dgvSalesReturn2.Rows[dgvSalesReturn2.Rows.Count - 2].Cells["dgvTextTaxName"].Value = drowDetails["taxName"].ToString(); dgvSalesReturn2.Rows[dgvSalesReturn2.Rows.Count - 2].Cells["dgvTextTaxId"].Value = drowDetails["taxId"].ToString(); dgvSalesReturn2.Rows[dgvSalesReturn2.Rows.Count - 2].Cells["dgvTextAmount"].Value = 0.00; dgvSalesReturn2.Rows[dgvSalesReturn2.Rows.Count - 2].Cells["dgvRate"].Value = drowDetails["rate"].ToString(); } SerialNo2(); } catch (Exception ex) { MessageBox.Show("SR65:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }