private void btnOk_Click(object sender, EventArgs e) { if (is_Validate()) { try { de.AddNHIFRate( decimal.Parse(txtFromAmount.Text.Trim()), decimal.Parse(txtToAmount.Text.Trim()), decimal.Parse(txtRate.Text.Trim())); NHIFRates f = (NHIFRates)this.Owner; f.RefreshGrid(); this.Close(); } catch (Exception ex) { Utils.ShowError(ex); } } }