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
        public static PlanPresse CreatePlanPresse(string name, Compaign compaign)
        {
            var planPresse = new PlanPresse() { Name = name, id = Guid.NewGuid()};
            if (compaign.PlanPresses == null) compaign.PlanPresses = new List<PlanPresse>();

            compaign.PlanPresses.Add(planPresse);
            return planPresse;
        }
Ejemplo n.º 3
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.º 4
0
        public static PlanPresse  CreatePlanPresse(string name, Compaign compaign)
        {
            var planPresse = new PlanPresse()
            {
                Name = name, id = new Guid()
            };

            if (compaign.PlanPresses == null)
            {
                compaign.PlanPresses = new List <PlanPresse>();
            }
            compaign.PlanPresses.Add(planPresse);
            return(planPresse);
        }
Ejemplo n.º 5
0
        public static List<PlanPresse> MapPlanPresse(XPCollection<XpoPlanPresse> XpoplanPresses)
        {
            var listePlan = new List<PlanPresse>();
            foreach (var XpoplanPress in XpoplanPresses)
            {
                var planPr = new PlanPresse()
                    {
                        id = XpoplanPress.Oid,
                        Name = XpoplanPress.Name,
                    };

                planPr.InsertionPresses.AddRange(MapInsertionPresse(XpoplanPress.XpoInsertionPresses));
                    listePlan.Add(planPr);
            }
            return listePlan;
        }
Ejemplo n.º 6
0
        public static XpoPlanPresse MapPlanPresse(PlanPresse planPresse, UnitOfWork uow)
        {
            var xpoPlanPresse = new XpoPlanPresse(uow);
            xpoPlanPresse.Name = planPresse.Name;
            xpoPlanPresse.Oid = planPresse.id;
            xpoPlanPresse.NombreSig = planPresse.NombreSignalitique;

            if (planPresse.InsertionPresses != null)
            foreach (var insertionPresse in planPresse.InsertionPresses)
            {
                xpoPlanPresse.XpoInsertionPresses.Add(MapInsertionPresse(insertionPresse,uow));
            }

            return xpoPlanPresse;
        }