|
|
@ -0,0 +1,694 @@ |
|
|
|
|
|
|
|
using EPAServeur.Context; |
|
|
|
|
|
|
|
using EPAServeur.Exceptions; |
|
|
|
|
|
|
|
using EPAServeur.IServices; |
|
|
|
|
|
|
|
using EPAServeur.Models.EP; |
|
|
|
|
|
|
|
using EPAServeur.Models.Formation; |
|
|
|
|
|
|
|
using EPAServeur.Models.SaisieChamp; |
|
|
|
|
|
|
|
using IO.Swagger.DTO; |
|
|
|
|
|
|
|
using IO.Swagger.Enum; |
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
|
|
|
|
using System; |
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
using System.Linq; |
|
|
|
|
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace EPAServeur.Services |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
public class DemandeFormationService : IDemandeFormationService |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
#region Variables |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Accès et gestion de la base de données |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
private readonly EpContext epContext; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Accès et service collaborateur |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
private readonly ICollaborateurService collaborateurService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Nombre d'éléments min à afficher par page |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
private readonly int minParPage = 5; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Nom d'éléments max à affichar par page |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
private readonly int maxParPage = 100; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Nombre d'éléments à afficher par défaut par page |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
private readonly int defaultParPage = 15; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Numéro de page min à afficher par défaut |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
private readonly int defaultNumPage = 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Ordonnancement par défaut |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
private readonly bool defaultAsc = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Contructeurs |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Constructeur de la classe FormationService |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="_epContext"></param> |
|
|
|
|
|
|
|
public DemandeFormationService(EpContext _epContext, ICollaborateurService _collaborateurService) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
epContext = _epContext; |
|
|
|
|
|
|
|
collaborateurService = _collaborateurService; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Méthodes Service |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récupérer la liste des origines des demandes de formation. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
public async Task<IEnumerable<OrigineDemandeFormationDTO>> GetOriginesDemandeFormationAsync() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IEnumerable<OrigineDemande> origineDemandes; |
|
|
|
|
|
|
|
IEnumerable<OrigineDemandeFormationDTO> origineDemandeDTOs; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
origineDemandes = await epContext.OrigineDemandeFormation.ToListAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
origineDemandeDTOs = origineDemandes.Select(origineFormation => GetOrigineDemandeFormationDTO(origineFormation)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return origineDemandeDTOs; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récupérer la liste des demandes de formation. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="etatsDemande">Liste des états des demandes à afficher</param> |
|
|
|
|
|
|
|
/// <param name="idBUs">liste des ids des BU auxquelles les données sont rattachées</param> |
|
|
|
|
|
|
|
/// <param name="asc">Indique si les données sont récupérées dans l'ordre croissant ou non</param> |
|
|
|
|
|
|
|
/// <param name="numPage">Numéro de la page du tableau à afficher</param> |
|
|
|
|
|
|
|
/// <param name="parPage">Nombre d’élément maximum à afficher dans le tableau</param> |
|
|
|
|
|
|
|
/// <param name="texte">Texte permettant de filtrer les données</param> |
|
|
|
|
|
|
|
/// <param name="tri">Colonne du tableau sur lequel le tri devra être effectué</param> |
|
|
|
|
|
|
|
/// <param name="dateDebut">Date à partir de laquelle les données son récupérées</param> |
|
|
|
|
|
|
|
/// <param name="dateFin">Date jusqu'à laquelle les données sont récupérées</param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
public async Task<IEnumerable<DemandeFormationDTO>> GetDemandesFormationAsync(List<EtatDemande> etatsDemande, List<long?> idBUs, bool? asc, int? numPage, int? parPage, string texte, string tri, DateTime? dateDebut, DateTime? dateFin) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IQueryable<DemandeFormation> query; |
|
|
|
|
|
|
|
IEnumerable<DemandeFormation> demandeFormations; |
|
|
|
|
|
|
|
IEnumerable<DemandeFormationDTO> demandeFormationDTOs; |
|
|
|
|
|
|
|
IEnumerable<CollaborateurDTO> collaborateurDTOs; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
query = epContext.DemandeFormation |
|
|
|
|
|
|
|
.Include(demandeFormation => demandeFormation.Ep) |
|
|
|
|
|
|
|
.Include(demandeFormation => demandeFormation.ParticipationFormation) |
|
|
|
|
|
|
|
.ThenInclude(participationFormation => participationFormation.Formation); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
query = EtatsDemandeFilter(query, etatsDemande); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
query = IdBUsFilter(query, idBUs); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
query = DateFilter(query, dateDebut, dateFin); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
query = OrderByColumn(query, asc, tri); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
query = SkipAndTake(query, parPage, numPage); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
demandeFormations = await query.ToListAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collaborateurDTOs = await GetCollaborateurDTOs(demandeFormations); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
demandeFormationDTOs = demandeFormations.Select(demandeFormation => GetDemandeFormationDTO(demandeFormation, collaborateurDTOs)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return demandeFormationDTOs; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récupérer le nombre total de demandes de formation. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="etatsDemande">Liste des états des demandes à afficher</param> |
|
|
|
|
|
|
|
/// <param name="idBUs">liste des ids des BU auxquelles les données sont rattachées</param> |
|
|
|
|
|
|
|
/// <param name="texte">Texte permettant de filtrer les données</param> |
|
|
|
|
|
|
|
/// <param name="dateDebut">Date à partir de laquelle les données son récupérées</param> |
|
|
|
|
|
|
|
/// <param name="dateFin">Date jusqu'à laquelle les données sont récupérées</param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
public async Task<IEnumerable<DemandeFormationDTO>> GetDemandesFormationCountAsync(List<EtatDemande> etatsDemande, List<long?> idBUs, string texte, DateTime? dateDebut, DateTime? dateFin) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
throw new NotImplementedException(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Créer demande de formation pour un collaborateur. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="demandeFormationDTO"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
public async Task<DemandeFormationDTO> AddDemandeFormationAsync(DemandeFormationDTO demandeFormationDTO) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
throw new NotImplementedException(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Répondre à une demande de formation. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="idDemandeFormation"></param> |
|
|
|
|
|
|
|
/// <param name="demandeFormationDTO"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
public async Task<DemandeFormationDTO> UpdateDemandeFormationAsync(long idDemandeFormation, DemandeFormationDTO demandeFormationDTO) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
throw new NotImplementedException(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Supprimer une demande de formation. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="idDemandeFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
public async Task<bool> DeleteDemandeFormationAsync(long idDemandeFormation) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
throw new NotImplementedException(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Méthodes Privée |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Vérifier si un objet DemandeFormationDTO est valide pour une mise à jour |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <remarks> |
|
|
|
|
|
|
|
/// Un objet DemandeFormationDTO est valide si l'objet n'est pas null, si le libellé, la descritpion, |
|
|
|
|
|
|
|
/// la date de demande de début et la valeur permettant de dire si la demande a été créé par une RH ou non ne sont pas null. |
|
|
|
|
|
|
|
/// </remarks> |
|
|
|
|
|
|
|
/// <param name="demande"></param> |
|
|
|
|
|
|
|
/// <returns>true si l'objet est valide, false sinon</returns> |
|
|
|
|
|
|
|
private void IsDemandeFormationValide(DemandeFormationDTO demande) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// Vérifier que la demande de formation n'est pas null |
|
|
|
|
|
|
|
if (demande == null) |
|
|
|
|
|
|
|
throw new DemandeFormationInvalidException("Aucune évaluation n'a été reçue."); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Vérifier que la demande de formation a bien un libellé |
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(demande.Libelle)) |
|
|
|
|
|
|
|
throw new DemandeFormationInvalidException("Le libellé de la demande de formation doit contenir au moins 1 caractère."); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Vérifier que la demande de formation a bien une description |
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(demande.Description)) |
|
|
|
|
|
|
|
throw new DemandeFormationInvalidException("La description de la demande de formation doit contenir au moins 1 caractère."); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Vérifier que la demande de formation a bien une valeur permettant de dire s'il s'agit d'une demande créée par une RH ou non |
|
|
|
|
|
|
|
if (!demande.DemandeRH.HasValue) |
|
|
|
|
|
|
|
throw new DemandeFormationInvalidException("Impossible de répondre à une demande de formation sans savoir si la demande a été créé par une RH ou non."); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Vérifier que la demande de formation a bien une date de demande |
|
|
|
|
|
|
|
if (!demande.DateDemande.HasValue) |
|
|
|
|
|
|
|
throw new DemandeFormationInvalidException("Une date de demande de formation est requise."); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Ajouter un ordonnancement croissant ou décroissant sur colonne |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="query"></param> |
|
|
|
|
|
|
|
/// <param name="asc"></param> |
|
|
|
|
|
|
|
/// <param name="columnName"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private IQueryable<DemandeFormation> OrderByColumn(IQueryable<DemandeFormation> query, bool? asc, string columnName) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (!asc.HasValue) |
|
|
|
|
|
|
|
asc = defaultAsc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(columnName)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (asc.Value) |
|
|
|
|
|
|
|
return query.OrderBy(p => p.Libelle); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return query.OrderByDescending(p => p.Libelle); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (columnName.ToLower()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case "businessunit": |
|
|
|
|
|
|
|
if (asc.Value) |
|
|
|
|
|
|
|
return query.OrderBy(d => d.Libelle); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return query.OrderByDescending(p => p.Libelle); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
if (asc.Value) |
|
|
|
|
|
|
|
return query.OrderBy(p => p.Libelle); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return query.OrderByDescending(p => p.Libelle); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Ajouter un filtre pour récupérer les demandes de formation en fonction de plusieurs états de demande |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="query"></param> |
|
|
|
|
|
|
|
/// <param name="etatsDemande"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private IQueryable<DemandeFormation> EtatsDemandeFilter(IQueryable<DemandeFormation> query, List<EtatDemande> etatsDemande) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (etatsDemande != null && etatsDemande.Count > 0) |
|
|
|
|
|
|
|
return query.Where(demandeFormation => etatsDemande.Contains(demandeFormation.Etat)); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return query; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Ajouter un filtre pour récupérer les demandes de formation en fonction de l'id BU des collaborateurs |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="query"></param> |
|
|
|
|
|
|
|
/// <param name="idBus"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private IQueryable<DemandeFormation> IdBUsFilter(IQueryable<DemandeFormation> query, List<long?> idBus) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (idBus != null && idBus.Count > 0) |
|
|
|
|
|
|
|
return query.Where(demandeFormation => idBus.Contains(demandeFormation.Ep.IdBu)); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return query; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Ajouter un filtre pour récupérer les formations en fonction d'un intitulé |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="query"></param> |
|
|
|
|
|
|
|
/// <param name="intitule"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private IQueryable<Formation> IntituleFilter(IQueryable<Formation> query, string intitule) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(intitule)) |
|
|
|
|
|
|
|
return query.Where(formation => formation.Intitule.ToLower().Contains(intitule.ToLower())); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return query; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Ajouter un filtre pour récupérer les formations en fonction d'un intervalle de date |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="query"></param> |
|
|
|
|
|
|
|
/// <param name="dateDebut"></param> |
|
|
|
|
|
|
|
/// <param name="dateFin"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private IQueryable<DemandeFormation> DateFilter(IQueryable<DemandeFormation> query, DateTime? dateDebut, DateTime? dateFin) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (dateDebut.HasValue && dateFin.HasValue) |
|
|
|
|
|
|
|
return query.Where(demandeFormation => demandeFormation.DateDemande >= dateDebut.Value && demandeFormation.DateDemande <= dateFin.Value.AddDays(1)); |
|
|
|
|
|
|
|
else if (!dateDebut.HasValue && dateFin.HasValue) |
|
|
|
|
|
|
|
return query.Where(demandeFormation => demandeFormation.DateDemande <= dateFin.Value.AddDays(1)); |
|
|
|
|
|
|
|
else if (dateDebut.HasValue && !dateFin.HasValue) |
|
|
|
|
|
|
|
return query.Where(demandeFormation => demandeFormation.DateDemande >= dateDebut.Value); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return query; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Ajouter une pagination |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="query"></param> |
|
|
|
|
|
|
|
/// <param name="parPage"></param> |
|
|
|
|
|
|
|
/// <param name="numPage"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private IQueryable<DemandeFormation> SkipAndTake(IQueryable<DemandeFormation> query, int? parPage, int? numPage) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int skip, take; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!parPage.HasValue || parPage.Value < minParPage || parPage.Value > maxParPage) |
|
|
|
|
|
|
|
parPage = defaultParPage; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!numPage.HasValue || numPage.Value <= 0) |
|
|
|
|
|
|
|
numPage = defaultNumPage; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skip = (numPage.Value - 1) * parPage.Value; |
|
|
|
|
|
|
|
take = parPage.Value; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return query.Skip(skip).Take(take); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Object to DTO |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer un objet OrigineDemandeFormationDTO en fonction d'un objet OrigineDemande |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="origineDemande"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private OrigineDemandeFormationDTO GetOrigineDemandeFormationDTO(OrigineDemande origineDemande) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (origineDemande == null) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OrigineDemandeFormationDTO origineDemandeFormationDTO = new OrigineDemandeFormationDTO() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = origineDemande.IdOrigineDemande, |
|
|
|
|
|
|
|
Libelle = origineDemande.Libelle |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return origineDemandeFormationDTO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer un objet DemandeFormationDTO en fonction d'un objet DemandeFormation et d'une liste de CollaborateurDTO |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="demandeFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private DemandeFormationDTO GetDemandeFormationDTO(DemandeFormation demandeFormation, IEnumerable<CollaborateurDTO> collaborateurDTOs) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (demandeFormation == null) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (collaborateurDTOs == null || !collaborateurDTOs.Any()) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DemandeFormationDTO demandeFormationDTO = new DemandeFormationDTO() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = demandeFormation.IdDemandeFormation, |
|
|
|
|
|
|
|
Libelle = demandeFormation.Libelle, |
|
|
|
|
|
|
|
Description = demandeFormation.Description, |
|
|
|
|
|
|
|
DemandeRH = demandeFormation.DemandeRH, |
|
|
|
|
|
|
|
DateDemande = demandeFormation.DateDemande, |
|
|
|
|
|
|
|
EtatDemande = demandeFormation.Etat, |
|
|
|
|
|
|
|
CommentaireRefus = demandeFormation.CommentaireRefus, |
|
|
|
|
|
|
|
DateDerniereReponse = demandeFormation.DateDerniereReponse, |
|
|
|
|
|
|
|
//Origine = GetOrigineDemandeFormationDTO(demandeFormation.OrigineFormation), // Voir avec Yanael |
|
|
|
|
|
|
|
Collaborateur = GetCollaborateurDTO(demandeFormation, collaborateurDTOs), |
|
|
|
|
|
|
|
Ep = GetEpInformationDTO(demandeFormation.Ep, collaborateurDTOs), |
|
|
|
|
|
|
|
Formation = GetFormationDTO(demandeFormation.ParticipationFormation.Formation, collaborateurDTOs) |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return demandeFormationDTO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer un objet FormationDTO avec des participations en fonction d'un objet Formation et d'une liste de CollaborateurDTO |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="formation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private FormationDTO GetFormationDTO(Formation formation, IEnumerable<CollaborateurDTO> collaborateurDTOs) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (formation == null || collaborateurDTOs == null || !collaborateurDTOs.Any()) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FormationDTO formationDTO = new FormationDTO() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = formation.IdFormation, |
|
|
|
|
|
|
|
Intitule = formation.Intitule, |
|
|
|
|
|
|
|
IdAgence = formation.IdAgence, |
|
|
|
|
|
|
|
DateDebut = formation.DateDebut, |
|
|
|
|
|
|
|
DateFin = formation.DateFin, |
|
|
|
|
|
|
|
Heure = formation.Heure, |
|
|
|
|
|
|
|
Jour = formation.Jour, |
|
|
|
|
|
|
|
Organisme = formation.Organisme, |
|
|
|
|
|
|
|
EstCertifiee = formation.EstCertifiee, |
|
|
|
|
|
|
|
EstRealisee = formation.EstRealisee, |
|
|
|
|
|
|
|
Origine = GetOrigineFormationDTO(formation.Origine), |
|
|
|
|
|
|
|
Statut = GetStatutFormationDTO(formation.Statut), |
|
|
|
|
|
|
|
Mode = GetModeFormationDTO(formation.ModeFormation), |
|
|
|
|
|
|
|
Type = GetTypeFormationDTO(formation.TypeFormation), |
|
|
|
|
|
|
|
Participations = GetParticipationsFormationDTO(formation.ParticipationsFormation, collaborateurDTOs) |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return formationDTO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer un objet OrigineFormationDTO en fonction d'un objet OrigineFormation |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="origineFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private OrigineFormationDTO GetOrigineFormationDTO(OrigineFormation origineFormation) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (origineFormation == null) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OrigineFormationDTO origineFormationDTO = new OrigineFormationDTO() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = origineFormation.IdOrigineFormation, |
|
|
|
|
|
|
|
Libelle = origineFormation.Libelle |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return origineFormationDTO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer un objet StatutFormationDTO en fonction d'un objet StatutFormation |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="statutFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private StatutFormationDTO GetStatutFormationDTO(StatutFormation statutFormation) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (statutFormation == null) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StatutFormationDTO statutFormationDTO = new StatutFormationDTO() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = statutFormation.IdStatutFormation, |
|
|
|
|
|
|
|
Libelle = statutFormation.Libelle |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return statutFormationDTO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer un objet ModeFormationDTO en fonction d'un objet ModeFormation |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="modeFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private ModeFormationDTO GetModeFormationDTO(ModeFormation modeFormation) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (modeFormation == null) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ModeFormationDTO modeFormationDTO = new ModeFormationDTO() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = modeFormation.IdModeFormation, |
|
|
|
|
|
|
|
Libelle = modeFormation.Libelle |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return modeFormationDTO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer un objet TypeFormationDTO en fonction d'un objet TypeFormation |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="typeFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private TypeFormationDTO GetTypeFormationDTO(TypeFormation typeFormation) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (typeFormation == null) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TypeFormationDTO typeFormationDTO = new TypeFormationDTO() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = typeFormation.IdTypeFormation, |
|
|
|
|
|
|
|
Libelle = typeFormation.Libelle |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return typeFormationDTO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer une liste de ParticipationFormationDTO en fonction d'une liste de ParticipationFormation et d'une liste de CollaborateurDTO. Retourne null s'il n'y a aucune participation ou aucun collaborateur. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="typeFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private List<ParticipationFormationDTO> GetParticipationsFormationDTO(List<ParticipationFormation> participationsFormation, IEnumerable<CollaborateurDTO> collaborateurDTOs) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
List<ParticipationFormationDTO> participationFormationDTOs; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (participationsFormation == null || participationsFormation.Count == 0 || collaborateurDTOs == null || !collaborateurDTOs.Any()) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
participationFormationDTOs = participationsFormation.Select(participationFormation => GetParticipationFormationDTO(participationFormation, collaborateurDTOs)) |
|
|
|
|
|
|
|
.OrderBy(participationFormation => participationFormation.Collaborateur.Nom) |
|
|
|
|
|
|
|
.ThenBy(participationFormation => participationFormation.Collaborateur.Prenom).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return participationFormationDTOs; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer un objet ParticipationFormationDTO en fonction d'un objet ParticipationFormation et d'une liste de CollaborateurDTO |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="participationFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private ParticipationFormationDTO GetParticipationFormationDTO(ParticipationFormation participationFormation, IEnumerable<CollaborateurDTO> collaborateurDTOs) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (participationFormation == null || collaborateurDTOs == null || !collaborateurDTOs.Any()) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ParticipationFormationDTO participationFormationDTO = new ParticipationFormationDTO() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = participationFormation.IdParticipationFormation, |
|
|
|
|
|
|
|
DateCreation = participationFormation.DateCreation, |
|
|
|
|
|
|
|
Intitule = participationFormation.Formation.Intitule, |
|
|
|
|
|
|
|
DateDebut = participationFormation.Formation.DateDebut, |
|
|
|
|
|
|
|
Statut = GetStatutFormationDTO(participationFormation.Formation.Statut), |
|
|
|
|
|
|
|
Collaborateur = GetCollaborateurDTO(participationFormation, collaborateurDTOs), |
|
|
|
|
|
|
|
Ep = GetEpInformationDTO(participationFormation.DemandeFormation.Ep, collaborateurDTOs) |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return participationFormationDTO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récupère un objet CollaborateurDTO en fonction d'un objet ParticipationFormation et d'une liste de CollaborateurDTO |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="participationFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private CollaborateurDTO GetCollaborateurDTO(ParticipationFormation participationFormation, IEnumerable<CollaborateurDTO> collaborateurDTOs) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (participationFormation == null || collaborateurDTOs == null || !collaborateurDTOs.Any()) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return collaborateurDTOs.FirstOrDefault(collaborateurDTO => collaborateurDTO.Id == participationFormation.DemandeFormation.Ep.IdCollaborateur); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récupère un objet CollaborateurDTO en fonction d'un objet DemandeFormation et d'une liste de CollaborateurDTO |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="demandeFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private CollaborateurDTO GetCollaborateurDTO(DemandeFormation demandeFormation, IEnumerable<CollaborateurDTO> collaborateurDTOs) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (demandeFormation == null || collaborateurDTOs == null || !collaborateurDTOs.Any()) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return collaborateurDTOs.FirstOrDefault(collaborateurDTO => collaborateurDTO.Id == demandeFormation.Ep.IdCollaborateur); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer une liste de CollaborateurDTO contenant les collaborateurs et les référents. Retourne null s'il n'y a aucune demande de formation. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="demandeFormations"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private async Task<IEnumerable<CollaborateurDTO>> GetCollaborateurDTOs(IEnumerable<DemandeFormation> demandeFormations) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (demandeFormations == null || !demandeFormations.Any()) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Guid?> guids = demandeFormations.SelectMany(demandeFormation => new[] { (Guid?)demandeFormation.Ep.IdCollaborateur, demandeFormation.Ep.IdReferent }).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return await collaborateurService.GetCollaborateurDTOsAsync(guids); ; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer une liste de CollaborateurDTO contenant les collaborateurs et les référents. Retourne null s'il n'y a aucune participation. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="participationsFormation"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private async Task<IEnumerable<CollaborateurDTO>> GetCollaborateurDTOs(IEnumerable<ParticipationFormation> participationsFormation) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (participationsFormation == null || !participationsFormation.Any()) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Guid?> guids = participationsFormation.SelectMany(participationFormation => new[] { (Guid?)participationFormation.DemandeFormation.Ep.IdCollaborateur, participationFormation.DemandeFormation.Ep.IdReferent }).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return await collaborateurService.GetCollaborateurDTOsAsync(guids); ; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récupère un objet EpInformationDTO en fonction d'un objet Ep et d'une liste de CollaborateurDTO |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="ep"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private EpInformationDTO GetEpInformationDTO(Ep ep, IEnumerable<CollaborateurDTO> collaborateurDTOs) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CollaborateurDTO collaborateur; |
|
|
|
|
|
|
|
CollaborateurDTO referent; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ep == null) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (collaborateurDTOs == null || !collaborateurDTOs.Any()) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collaborateur = collaborateurDTOs.FirstOrDefault(collaborateurDTO => collaborateurDTO.Id == ep.IdCollaborateur); |
|
|
|
|
|
|
|
referent = collaborateurDTOs.FirstOrDefault(collaborateurDTO => collaborateurDTO.Id == ep.IdReferent); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EpInformationDTO epInformationDTO = new EpInformationDTO() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = ep.IdEP, |
|
|
|
|
|
|
|
Type = ep.TypeEP, |
|
|
|
|
|
|
|
Statut = ep.Statut, |
|
|
|
|
|
|
|
DateDisponibilite = ep.DateDisponibilite, |
|
|
|
|
|
|
|
DatePrevisionnelle = ep.DatePrevisionnelle, |
|
|
|
|
|
|
|
Obligatoire = ep.Obligatoire, |
|
|
|
|
|
|
|
Collaborateur = collaborateur, |
|
|
|
|
|
|
|
Referent = referent, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return epInformationDTO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region DTO to Object |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer un objet Saisie en fonction d'un objet SaisieDTO |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="saisieDTO"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private Saisie GetSaisie(SaisieDTO saisieDTO) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (saisieDTO == null) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Saisie saisie = new Saisie() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//IdSaisie = saisieDTO.Id.Value, |
|
|
|
|
|
|
|
Note = saisieDTO.Note, |
|
|
|
|
|
|
|
Texte = saisieDTO.Texte, |
|
|
|
|
|
|
|
Champ = GetChamp(saisieDTO.Champ), |
|
|
|
|
|
|
|
TypeSaisie = saisieDTO.TypeSaisie |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return saisie; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Récuperer un objet Champ en fonction d'un objet ChampDTO |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="champDTO"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
private Champ GetChamp(ChampDTO champDTO) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (champDTO == null) |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Champ champ = new Champ() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IdChamp = champDTO.Id.Value, |
|
|
|
|
|
|
|
Texte = champDTO.Texte, |
|
|
|
|
|
|
|
Section = champDTO.Section, |
|
|
|
|
|
|
|
SousSection = champDTO.Soussection, |
|
|
|
|
|
|
|
Ordre = champDTO.Ordre.Value, |
|
|
|
|
|
|
|
TypeChamp = champDTO.TypeChamp, |
|
|
|
|
|
|
|
TypeSaisie = champDTO.TypeSaisie |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return champ; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |