/// <summary> /// Team Site All reports /// </summary> /// <param name="userAlias"></param> /// <param name="teamSiteGuid"></param> /// <param name="isAdmin"></param> /// <param name="sortField"></param> /// <param name="sortOrder"></param> /// <returns></returns> public IEnumerable <AppReport> GetAllReportsOfTeamSite(string userAlias, string teamSiteGuid, bool isAdmin, SortField sortField, SortOrder sortOrder) { TileServices tService = new TileServices(_tileRepository, _teamRepository, _reportRepository, null, null, null, null); int teamId = _teamRepository.GetFiltered(_ => _.TeamGuid == new Guid(teamSiteGuid)).FirstOrDefault().Id; ParameterProvider pp = new ParameterProvider(); pp.AddParameter(ContextVariable.CurrentTeamSiteGuid.ToString(), new Guid(teamSiteGuid)); //if (userAlias != "") //{ //pp.AddParameter(ContextVariable.CurrentUser.ToString(), userAlias); //} pp.AddParameter(ContextVariable.TeamSiteGuidUnderControl.ToString(), new List <Guid> { new Guid(teamSiteGuid) }); int allreportsTileId = _tileRepository.GetAllReportsTileId(teamId); return(_reportRepository. GetReportsByExpression( tService.GetTeamSite_AllReportsTile() .GetCombinedLogic(isAdmin, allreportsTileId) .GetExpression(pp)).ToArray() .Select(_ => _.ToAppReport())); }