public ProgrammationDocumentPGE Map(ProgrammationDocumentPgeDto source) { var target = new ProgrammationDocumentPGE(); this.Map(source, target); return(target); }
public void Map(ProgrammationDocumentPgeDto source, ProgrammationDocumentPGE target) { target.Id = source.Id; target.IdDocument = source.IdDocument; target.NumeroAffaire = source.NumeroAffaire; target.NumRang = source.Rang; target.NumMedian = source.Median; target.IsExAequo = source.IsEx; target.IsValideEx = source.IsValidEx; target.Commentaire = source.Commentaire; target.Surface = source.Surface; target.IsTravauxPlusieursAnnee = source.IsTravauxPlusieursAnnee; target.Annee = source.Annee; target.Budget = source.Budget; //target.Categorie = this.GetCategorie(this.ListeCategoriePge.Where(x => x.NumeroAffaire == source.NumeroAffaire).First().Categorie ?? null); }
public void Map(ProgrammationDocumentPGE source, ProgrammationDocumentPgeDto target) { //TODO YAF, changer le mapping de cette prop, remplacer IdProgrammation par ID de l'objet target.Id = source.Id; target.IdDocument = source.IdDocument.GetValueOrDefault(); target.NumeroAffaire = source.NumeroAffaire; target.Programmation = programmationMapping.Map(source.Programmations); target.Rang = source.NumRang; target.Median = source.NumMedian; target.IsEx = source.IsExAequo; target.IsValidEx = source.IsValideEx; target.Commentaire = source.Commentaire; target.Surface = source.Surface; target.IsTravauxPlusieursAnnee = source.IsTravauxPlusieursAnnee; target.Annee = source.Annee; target.Budget = source.Budget; target.Categorie = this.GetCategoriePge(source.Categorie.GetValueOrDefault()); if (this.hidalgoUow != null) { var pv = this.hidalgoUow.HidalgoRepository.GetPvByDocumentPge(source.NumeroAffaire); if (pv != null) { //foreach (var item in pv.Planification) //{ // target.Lieu = lieuMapping.Map(item.GroupeOuvrage.Lieux); // target.Ligne = ligneMapping.Map(item.GroupeOuvrage.Lieux.Lignes); // break; //} foreach (var item in pv.GroupeOuvrage) { target.Lieu = lieuMapping.Map(item.Lieux); target.Ligne = ligneMapping.Map(item.Lieux.Lignes); break; } } } }