/// <summary> /// 界面初始化获取用户权限 /// </summary> private void GetRoleHasDuty() { Role role = RoleBll.GetRoleHasDuty(User.RoleId); if (role.UserManage == 0) { tsmiAddUser.Enabled = false; tsmiUserManage.Enabled = false; } if (role.Role1 == 0) { tsmiRoleManage.Enabled = false; } if (role.UserScore == 0) { tsmiFS.Enabled = false; tsbFS.Enabled = false; } if (role.CourseManage == 0) { tsmiCM.Enabled = false; } if (role.PaperSetup == 0) { tsmiPSU.Enabled = false; tsbPSU.Enabled = false; } if (role.PaperLists == 0) { tsmiPM.Enabled = false; } if (role.UserPaperList == 0) { tsmiUP.Enabled = false; tsbUP.Enabled = false; } if (role.QuestionManage == 0) { MessageBox.Show(role.QuestionManage.ToString()); tsmiQDB.Enabled = false; } }