private void btnThemNguoiDung_Click(object sender, EventArgs e) { frmAddUser frmnd = new frmAddUser(); frmnd.ThemThanhCong += FillTreeView; frmnd.ThemThanhCong += NhatKyThemNguoiDung; frmnd.CapNhatVaiTro += FillTreeView; frmnd.ShowDialog(); }
private void BtnSua_Click(object sender, EventArgs e) { if (IDUser == null) { VaiTro vt = LayVaiTroDangChon(); frmAddRole frmvt = new frmAddRole(vt); frmvt.CapNhatThanhCong += FillTreeView; frmvt.CapNhatThanhCong += NhatKySuaVaiTro; frmvt.ShowDialog(); } else { NguoiDung nd = LayNguoiDungDangChon(); frmAddUser frm = new frmAddUser(nd); frm.CapNhatThanhCong += FillTreeView; frm.CapNhatThanhCong += NhatKySuaNguoiDung; frm.ShowDialog(); } }