Ejemplo n.º 1
0
 public static InsertionPresse CreateInsertionPresse(PlanPresse planPresse, int nbFoisLus, SupportPresse supportPresse,DateTime date)
 {
     var insertionPresse = new InsertionPresse() { Date = date,NombreFoisLus = nbFoisLus, SupportPresse = supportPresse };
     if (planPresse.InsertionPresses == null) planPresse.InsertionPresses = new List<InsertionPresse>();
     planPresse.InsertionPresses.Add(insertionPresse);
     return insertionPresse;
 }
Ejemplo n.º 2
0
        private static XpoInsertionPresse MapInsertionPresse(InsertionPresse insertionPresse, UnitOfWork uow)
        {
            var xpoInsertionPresse = new XpoInsertionPresse(uow);
            xpoInsertionPresse.Date = insertionPresse.Date;
            xpoInsertionPresse.NombreFoisLus = insertionPresse.NombreFoisLus;
            xpoInsertionPresse.Oid = Guid.NewGuid();
            xpoInsertionPresse.SupportPresse = uow.GetObjectByKey<XpoSupportPresse>(insertionPresse.SupportPresse.id);
            if (insertionPresse.Signalitique != null)
            foreach (var signalitique in insertionPresse.Signalitique)
            {
                xpoInsertionPresse.Signalitiques.Add(MapSignalitique(signalitique, uow));
            }

            return xpoInsertionPresse;
        }