private void btnAddUser_Click(object sender, EventArgs e) { var frm = new frmAddUser(); frm.InsertSuccess += new frmAddUser.ReloadDataDelegate(Frm_InsertSuccess); frm.Show(); }
private void btnUpdate_Click(object sender, EventArgs e) { int rowIndex = dgvUsers.CurrentCell.RowIndex; if (rowIndex >= 0) { var id = dgvUsers.Rows[rowIndex].Cells[0].Value.ToString(); var form = new frmAddUser(); form.InsertSuccess += new frmAddUser.ReloadDataDelegate(Frm_InsertSuccess); form.Show(); ActionUpDate(id); } }