/// <summary> /// 根据角色ID构造角色的信息 /// </summary> public Role(int currentRoleId) { dataRole = PubConstant.IsSQLServer ? (IRole) new Data.Role() : new MySqlData.Role(); DataRow roleRow; roleRow = dataRole.Retrieve(currentRoleId); roleId = currentRoleId; if (roleRow["Description"] != null) { description = (string)roleRow["Description"]; } IData.IPermission dataPermission = PubConstant.IsSQLServer ? (IPermission) new Data.Permission() : new MySqlData.Permission(); permissions = dataPermission.GetPermissionList(currentRoleId); nopermissions = dataPermission.GetNoPermissionList(currentRoleId); IData.IUser user = PubConstant.IsSQLServer ? (IUser) new Data.User() : new MySqlData.User(); users = user.GetUsersByRole(currentRoleId); }
/// <summary> /// 构造函数 /// </summary> public Role() { dataRole = PubConstant.IsSQLServer ? (IRole) new Data.Role() : new MySqlData.Role(); }
/// <summary> /// 获取部分角色 /// </summary> public static DataSet GetRoleList(string idlist) { IData.IRole dataRole = PubConstant.IsSQLServer ? (IRole) new Data.Role() : new MySqlData.Role(); return(dataRole.GetRoleList(idlist)); }