Ejemplo n.º 1
0
        /// <summary>
        /// Converts this instance of <see cref="plan"/> to an instance of <see cref="planDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="plan"/> to convert.</param>
        public static planDto ToDTO(this plan entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new planDto();

            dto.i_PlanId = entity.i_PlanId;
            dto.v_OrganizationSeguroId = entity.v_OrganizationSeguroId;
            dto.v_ProtocoloId          = entity.v_ProtocoloId;
            dto.v_IdUnidadProductiva   = entity.v_IdUnidadProductiva;
            dto.i_EsDeducible          = entity.i_EsDeducible;
            dto.i_EsCoaseguro          = entity.i_EsCoaseguro;
            dto.d_Importe = entity.d_Importe;

            entity.OnDTO(dto);

            return(dto);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Converts this instance of <see cref="planDto"/> to an instance of <see cref="plan"/>.
        /// </summary>
        /// <param name="dto"><see cref="planDto"/> to convert.</param>
        public static plan ToEntity(this planDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new plan();

            entity.i_PlanId = dto.i_PlanId;
            entity.v_OrganizationSeguroId = dto.v_OrganizationSeguroId;
            entity.v_ProtocoloId          = dto.v_ProtocoloId;
            entity.v_IdUnidadProductiva   = dto.v_IdUnidadProductiva;
            entity.i_EsDeducible          = dto.i_EsDeducible;
            entity.i_EsCoaseguro          = dto.i_EsCoaseguro;
            entity.d_Importe = dto.d_Importe;

            dto.OnEntity(entity);

            return(entity);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="plan"/> converted from <see cref="planDto"/>.</param>
 static partial void OnEntity(this planDto dto, plan entity);
Ejemplo n.º 4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="planDto"/> converted from <see cref="plan"/>.</param>
 static partial void OnDTO(this plan entity, planDto dto);