|
|
@ -117,9 +117,9 @@ namespace EPAServeur.Services |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (parPage.Value < minParPage || parPage.Value > maxParPage) |
|
|
|
if (!parPage.HasValue || parPage.Value < minParPage || parPage.Value > maxParPage) |
|
|
|
parPage = defaultParPage; |
|
|
|
parPage = defaultParPage; |
|
|
|
if (numPage.Value <= 0) |
|
|
|
if (!numPage.HasValue ||numPage.Value <= 0) |
|
|
|
numPage = 1; |
|
|
|
numPage = 1; |
|
|
|
|
|
|
|
|
|
|
|
int skip = (numPage.Value - 1) * parPage.Value; |
|
|
|
int skip = (numPage.Value - 1) * parPage.Value; |
|
|
@ -191,9 +191,12 @@ namespace EPAServeur.Services |
|
|
|
if (collaborateursIds.Count == 0) |
|
|
|
if (collaborateursIds.Count == 0) |
|
|
|
return new List<CollaborateurDTO>(); |
|
|
|
return new List<CollaborateurDTO>(); |
|
|
|
IEnumerable<Collaborateur> collaborateurs = await collaborateurApi.ChercherCollabAsync(collabsId: collaborateursIds); |
|
|
|
IEnumerable<Collaborateur> collaborateurs = await collaborateurApi.ChercherCollabAsync(collabsId: collaborateursIds); |
|
|
|
|
|
|
|
if (!parPage.HasValue || parPage.Value < minParPage || parPage.Value > maxParPage) |
|
|
|
|
|
|
|
parPage = maxParPage; |
|
|
|
|
|
|
|
if (!numPage.HasValue || numPage.Value <= 0) |
|
|
|
|
|
|
|
numPage = 1; |
|
|
|
int skip = (numPage.Value - 1) * parPage.Value; |
|
|
|
int skip = (numPage.Value - 1) * parPage.Value; |
|
|
|
int take = parPage.Value; |
|
|
|
int take = parPage.Value; |
|
|
|
|
|
|
|
|
|
|
|
var tasks = collaborateurs.Select(c => GetCollaborateurDTOAsync(c, false)); |
|
|
|
var tasks = collaborateurs.Select(c => GetCollaborateurDTOAsync(c, false)); |
|
|
|
IEnumerable<CollaborateurDTO> collaborateursDTO = await Task.WhenAll(tasks); |
|
|
|
IEnumerable<CollaborateurDTO> collaborateursDTO = await Task.WhenAll(tasks); |
|
|
|
if (texte != null && texte != "") |
|
|
|
if (texte != null && texte != "") |
|
|
|