diff --git a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs index 305e6f0b9..b444b83dd 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs @@ -65,8 +65,8 @@ namespace IRaCIS.Application.Services var subjectQuery = _readModuleViewRepository.WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId) .WhereIf(dto.SubjectId != null, x => x.Id == dto.SubjectId) - .WhereIf(dto.TrialSiteCode != null, x => x.TrialSiteCode == dto.TrialSiteCode) - .WhereIf(dto.SubjectCode != null, x => x.SubjectCode == dto.SubjectCode) + .WhereIf(dto.TrialSiteCode != null && dto.TrialSiteCode!=String.Empty, x => x.TrialSiteCode == dto.TrialSiteCode) + .WhereIf(dto.SubjectCode != null && dto.SubjectCode != String.Empty, x => x.SubjectCode == dto.SubjectCode) .WhereIf(dto.ModuleType != null, x => x.ModuleType == dto.ModuleType) .WhereIf(dto.Status != null, x => x.Status == dto.Status) .WhereIf(dto.Name != null, x => x.Name.Contains(x.Name)).OrderBy(x=>x.SiteCode);