private void btnNew_Click(object sender, EventArgs e)
 {
     frmBookRecord frm = new frmBookRecord();
     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["BookID", dgvData.CurrentCell.RowIndex].Value.ToString());
         frmBookRecord frm = new frmBookRecord(lngPKID);
         this.Hide();
         frm.ShowDialog(this);
         this.Show();
         this.BringToFront();
         frm.Dispose();
     }
     catch (FormatException)
     {
         frmBookRecord frm = new frmBookRecord();
         this.Hide();
         frm.ShowDialog(this);
         this.Show();
         this.BringToFront();
         frm.Dispose();
     }
     populateGrid();
 }