public questStatus Read(DbMgrTransaction trans, GroupId groupId, out GroupPrivilegeList groupPrivilegeList) { // Initialize questStatus status = null; groupPrivilegeList = null; // Read groupPrivilege status = _dbGroupPrivilegesMgr.Read(trans, groupId, out groupPrivilegeList); if (!questStatusDef.IsSuccess(status)) { return(status); } return(new questStatus(Severity.Success)); }
public questStatus Read(GroupId groupId, out GroupPrivilegeList groupPrivilegeList) { // Initialize questStatus status = null; groupPrivilegeList = null; // Get group Group group = null; status = _dbGroupsMgr.Read(groupId, out group); if (!questStatusDef.IsSuccess(status)) { return(status); } // Get group privileges using (FMSEntities dbContext = new FMSEntities()) { List <Quest.Services.Dbio.FMS.GroupPrivileges> _groupPrivilegeList = null; status = read(dbContext, groupId, out _groupPrivilegeList); if (!questStatusDef.IsSuccess(status)) { return(status); } groupPrivilegeList = new GroupPrivilegeList(); groupPrivilegeList.Group = group; foreach (Quest.Services.Dbio.FMS.GroupPrivileges _groupPrivilege in _groupPrivilegeList) { // Get privilege PrivilegeId privilegeId = new PrivilegeId(_groupPrivilege.PrivilegeId); Privilege privilege = null; status = _dbPrivilegesMgr.Read(privilegeId, out privilege); if (!questStatusDef.IsSuccess(status)) { return(status); } groupPrivilegeList.PrivilegeList.Add(privilege); } } return(new questStatus(Severity.Success)); }