private void btnNew_Click(object sender, EventArgs e) { frmLetterRecord frm = new frmLetterRecord(); this.Hide(); frm.ShowDialog(this); this.Show(); this.BringToFront(); populateGrid(); frm.Dispose(); }
public override void dgvData_DoubleClick(object sender, EventArgs e) { try { long lngPKID = long.Parse(dgvData["LetterID", dgvData.CurrentCell.RowIndex].Value.ToString()); frmLetterRecord frm = new frmLetterRecord(lngPKID); this.Hide(); frm.ShowDialog(this); this.Show(); this.BringToFront(); frm.Dispose(); } catch (FormatException) { frmLetterRecord frm = new frmLetterRecord(); this.Hide(); frm.ShowDialog(this); this.Show(); this.BringToFront(); frm.Dispose(); } populateGrid(); }