private void btnAddUser_Click(object sender, EventArgs e) { if (current_user.current_role.System_manage != 1) { Msbox.Show("亲~ 没权限哦--"); (sender as Control).Enabled = false;//关闭该控件 return; } frmAddUser frm_add_user = new frmAddUser(); frm_add_user.Show(); }
//系统设置 private void LoadSystemSetting() { if (current_user.current_role.System_manage != 1) { Msbox.Show("亲~ 没权限哦--"); } else { btnAddUser.Visible = true; btnAddRole.Visible = true; btnAeroWallpaperChanger.Visible = true; btnAdvanced_operations.Visible = true; } }