Example #1
0
        public IEnumerable <ProjectCP> GetProjects(Guid UserGuid, string searchValue, int skip, int take, string orderBy, string dir, List <AdvancedSearchRequest> postValue)
        {
            var projectList = _projectRepository.GetProjects(UserGuid, searchValue, skip, take, orderBy, dir, postValue);

            foreach (var project in projectList)
            {
                if (project.ContractGuid != Guid.Empty)
                {
                    project.IsFavorite = _recentActivityService.IsFavouriteActivity(project.ContractGuid ?? Guid.Empty, "PFS-Project", UserGuid);
                }
            }
            return(projectList);
        }
        public IEnumerable <Contracts> GetProjects(string searchValue, int pageSize, int skip, int take, string orderBy, string dir, List <AdvancedSearchRequest> postValue, Guid userGuid, string additionalFilter, bool isTaskOrder)
        {
            var isUserInSAGroup = _groupUserService.IsUserInSAGroup(userGuid);

            if (isUserInSAGroup)
            {
                additionalFilter = "all";
            }
            var projectList = _contractRepository.GetProjectListForPFS(searchValue, pageSize, skip, take, orderBy, dir, postValue, userGuid, additionalFilter, isTaskOrder);

            foreach (var project in projectList)
            {
                project.IsFavorite = _recentActivityService.IsFavouriteActivity(project.ContractGuid, "Contract", userGuid);
            }
            return(projectList);
        }