private void dgvAdmins_MouseDoubleClick(object sender, MouseEventArgs e) { try { var id = dgvAdmins.SelectedRows[0].Cells[0].Value; frmAdminDetails frm = new frmAdminDetails(int.Parse(id.ToString())); frm.refreshHandler += async(object s, object q) => { await AdminsLoad(); }; frm.Show(); } catch (Exception) { MessageBox.Show("Item unavailable"); } }
private void btnAdd_Click(object sender, EventArgs e) { frmAdminDetails frm = new frmAdminDetails(); frm.Show(); }