Ejemplo n.º 1
0
        public static VitalSignDTOA Convert(EntityEN en, NHibernate.ISession session = null)
        {
            VitalSignDTOA    dto = null;
            VitalSignRESTCAD vitalSignRESTCAD = null;
            VitalSignCEN     vitalSignCEN     = null;
            VitalSignCP      vitalSignCP      = null;

            if (en != null)
            {
                dto = new VitalSignDTOA();
                vitalSignRESTCAD = new VitalSignRESTCAD(session);
                vitalSignCEN     = new VitalSignCEN(vitalSignRESTCAD);
                vitalSignCP      = new VitalSignCP(session);


                VitalSignEN enHijo = vitalSignRESTCAD.ReadOIDDefault(en.Id);



                //
                // Attributes

                dto.Id = en.Id;

                dto.Name = en.Name;


                dto.Description = en.Description;


                //
                // TravesalLink

                /* Rol: VitalSign o--> Measure */
                dto.MeasureVitalSign = MeasureAssembler.Convert((MeasureEN)enHijo.Measure, session);


                //
                // Service
            }

            return(dto);
        }
        public static TargetDTOA Convert(TargetEN en, NHibernate.ISession session = null)
        {
            TargetDTOA    dto           = null;
            TargetRESTCAD targetRESTCAD = null;
            TargetCEN     targetCEN     = null;
            TargetCP      targetCP      = null;

            if (en != null)
            {
                dto           = new TargetDTOA();
                targetRESTCAD = new TargetRESTCAD(session);
                targetCEN     = new TargetCEN(targetRESTCAD);
                targetCP      = new TargetCP(session);



                //
                // Attributes

                dto.Id = en.Id;

                dto.DesiredValue = en.DesiredValue;


                dto.Description = en.Description;


                dto.DueDate = en.DueDate;


                //
                // TravesalLink

                /* Rol: Target o--> Measure */
                dto.Measure = MeasureAssembler.Convert((MeasureEN)en.Measure, session);


                //
                // Service
            }

            return(dto);
        }