private void radioGroup1_SelectedIndexChanged(object sender, EventArgs e) { DataTable dt = new DataTable(); dt = OtherCostBL.GetOtherInfraAmount(m_iFlatTypeId, m_iFlatId); if (dt.Rows.Count > 0) { if (radioGroup1.SelectedIndex == 0) { txtAmt.EditValue = Convert.ToDecimal(dt.Rows[0]["BaseAmt"]); m_sAmountType = "B"; } else { txtAmt.EditValue = Convert.ToDecimal(dt.Rows[0]["NetAmt"]); m_sAmountType = "N"; } txtNetAmt.EditValue = decimal.Round(Convert.ToDecimal(txtAmt.EditValue) * Convert.ToDecimal(txtPer.EditValue) / 100, 0); } }
private void frmOtherInfra_Load(object sender, EventArgs e) { radioGroup1.SelectedIndex = 0; DataTable dt = new DataTable(); dt = OtherCostBL.GetOtherInfraAmount(m_iFlatTypeId, m_iFlatId); if (dt.Rows.Count > 0) { if (radioGroup1.SelectedIndex == 0) { txtAmt.EditValue = Convert.ToDecimal(dt.Rows[0]["BaseAmt"]); m_sAmountType = "B"; } else { txtAmt.EditValue = Convert.ToDecimal(dt.Rows[0]["NetAmt"]); m_sAmountType = "N"; } } PopulateEditData(); }