private void BtnAdd_MouseUp(object sender, MouseEventArgs e) { FormSettingUser fUser = new FormSettingUser(); DialogResult Ret = fUser.ShowDialog(); if (Ret == DialogResult.Yes) { Setup(); } fUser.Close(); fUser.Dispose(); }
private void BtnEdit_MouseUp(object sender, MouseEventArgs e) { if (CheckDataAndSelect() == false) { return; } if (dgvUser.CurrentRow.Selected == true) { DaoUser User = (DaoUser)dgvUser.Rows[dgvUser.CurrentCell.RowIndex].DataBoundItem; FormSettingUser fUser = new FormSettingUser(User); DialogResult Ret = fUser.ShowDialog(); if (Ret == DialogResult.Yes) { Setup(); } fUser.Close(); fUser.Dispose(); } }