Пример #1
0
        /// <summary>
        /// Converts this instance of <see cref="recetadespacho"/> to an instance of <see cref="recetadespachoDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="recetadespacho"/> to convert.</param>
        public static recetadespachoDto ToDTO(this recetadespacho entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new recetadespachoDto();

            dto.i_IdDespacho      = entity.i_IdDespacho;
            dto.i_IdReceta        = entity.i_IdReceta;
            dto.d_MontoDespachado = entity.d_MontoDespachado;
            dto.t_FechaDespacho   = entity.t_FechaDespacho;

            entity.OnDTO(dto);

            return(dto);
        }
Пример #2
0
        /// <summary>
        /// Converts this instance of <see cref="recetadespachoDto"/> to an instance of <see cref="recetadespacho"/>.
        /// </summary>
        /// <param name="dto"><see cref="recetadespachoDto"/> to convert.</param>
        public static recetadespacho ToEntity(this recetadespachoDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new recetadespacho();

            entity.i_IdDespacho      = dto.i_IdDespacho;
            entity.i_IdReceta        = dto.i_IdReceta;
            entity.d_MontoDespachado = dto.d_MontoDespachado;
            entity.t_FechaDespacho   = dto.t_FechaDespacho;

            dto.OnEntity(entity);

            return(entity);
        }
Пример #3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="recetadespacho"/> converted from <see cref="recetadespachoDto"/>.</param>
 static partial void OnEntity(this recetadespachoDto dto, recetadespacho entity);
Пример #4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="recetadespachoDto"/> converted from <see cref="recetadespacho"/>.</param>
 static partial void OnDTO(this recetadespacho entity, recetadespachoDto dto);