コード例 #1
0
        int ICandidateBlockListsQuery.GetBlockedCount(IEmployer employer, Guid blockListId)
        {
            var blockList = _contenderListsQuery.GetList <CandidateBlockList>(blockListId);

            return(CanAccessBlockList(employer, blockList)
                ? _contenderListsQuery.GetListedCount(blockList.Id, null)
                : 0);
        }
コード例 #2
0
        int ICandidateFoldersQuery.GetInFolderCount(IEmployer employer, Guid folderId)
        {
            var folder = _contenderListsQuery.GetList <CandidateFolder>(folderId);

            return(CanAccessFolder(employer, folder)
                ? _contenderListsQuery.GetListedCount(folderId, NotIfInListTypes)
                : 0);
        }
コード例 #3
0
        int ICandidateListsCommand.AddCandidateToBlockList(IEmployer employer, CandidateBlockList blockList, Guid candidateId)
        {
            if (!CanModifyCandidates(employer, blockList))
            {
                throw new CandidateBlockListsPermissionsException(employer, blockList.Id);
            }

            AddCandidatesToBlockList(employer.Id, blockList, new[] { candidateId });
            return(_contenderListsQuery.GetListedCount(blockList.Id, null));
        }