Example #1
0
        /// <summary>
        /// Converts this instance of <see cref="receta"/> to an instance of <see cref="recetaDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="receta"/> to convert.</param>
        public static recetaDto ToDTO(this receta entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new recetaDto();

            dto.i_IdReceta = entity.i_IdReceta;
            dto.v_DiagnosticRepositoryId = entity.v_DiagnosticRepositoryId;
            dto.d_Cantidad          = entity.d_Cantidad;
            dto.v_Posologia         = entity.v_Posologia;
            dto.v_Duracion          = entity.v_Duracion;
            dto.t_FechaFin          = entity.t_FechaFin;
            dto.v_IdProductoDetalle = entity.v_IdProductoDetalle;
            dto.v_Lote               = entity.v_Lote;
            dto.i_IdAlmacen          = entity.i_IdAlmacen;
            dto.i_Lleva              = entity.i_Lleva;
            dto.i_NoLleva            = entity.i_NoLleva;
            dto.v_IdVentaPaciente    = entity.v_IdVentaPaciente;
            dto.v_IdVentaAseguradora = entity.v_IdVentaAseguradora;
            dto.v_IdUnidadProductiva = entity.v_IdUnidadProductiva;
            dto.d_SaldoPaciente      = entity.d_SaldoPaciente;
            dto.d_SaldoAseguradora   = entity.d_SaldoAseguradora;
            dto.v_ServiceId          = entity.v_ServiceId;

            entity.OnDTO(dto);

            return(dto);
        }
Example #2
0
        /// <summary>
        /// Converts this instance of <see cref="recetaDto"/> to an instance of <see cref="receta"/>.
        /// </summary>
        /// <param name="dto"><see cref="recetaDto"/> to convert.</param>
        public static receta ToEntity(this recetaDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new receta();

            entity.i_IdReceta = dto.i_IdReceta;
            entity.v_DiagnosticRepositoryId = dto.v_DiagnosticRepositoryId;
            entity.d_Cantidad          = dto.d_Cantidad;
            entity.v_Posologia         = dto.v_Posologia;
            entity.v_Duracion          = dto.v_Duracion;
            entity.t_FechaFin          = dto.t_FechaFin;
            entity.v_IdProductoDetalle = dto.v_IdProductoDetalle;
            entity.v_Lote               = dto.v_Lote;
            entity.i_IdAlmacen          = dto.i_IdAlmacen;
            entity.i_Lleva              = dto.i_Lleva;
            entity.i_NoLleva            = dto.i_NoLleva;
            entity.v_IdVentaPaciente    = dto.v_IdVentaPaciente;
            entity.v_IdVentaAseguradora = dto.v_IdVentaAseguradora;
            entity.v_IdUnidadProductiva = dto.v_IdUnidadProductiva;
            entity.d_SaldoPaciente      = dto.d_SaldoPaciente;
            entity.d_SaldoAseguradora   = dto.d_SaldoAseguradora;
            entity.v_ServiceId          = dto.v_ServiceId;

            dto.OnEntity(entity);

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