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

            var dto = new ticketDto();

            dto.v_TicketId        = entity.v_TicketId;
            dto.v_ServiceId       = entity.v_ServiceId;
            dto.d_Fecha           = entity.d_Fecha;
            dto.i_IsDeleted       = entity.i_IsDeleted;
            dto.i_InsertUserId    = entity.i_InsertUserId;
            dto.i_TipoCuentaId    = entity.i_TipoCuentaId;
            dto.i_ConCargoA       = entity.i_ConCargoA;
            dto.i_TicketInterno   = entity.i_TicketInterno;
            dto.d_InsertDate      = entity.d_InsertDate;
            dto.i_UpdateUserId    = entity.i_UpdateUserId;
            dto.d_UpdateDate      = entity.d_UpdateDate;
            dto.v_ComentaryUpdate = entity.v_ComentaryUpdate;

            entity.OnDTO(dto);

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

            var entity = new ticket();

            entity.v_TicketId        = dto.v_TicketId;
            entity.v_ServiceId       = dto.v_ServiceId;
            entity.d_Fecha           = dto.d_Fecha;
            entity.i_IsDeleted       = dto.i_IsDeleted;
            entity.i_InsertUserId    = dto.i_InsertUserId;
            entity.i_TipoCuentaId    = dto.i_TipoCuentaId;
            entity.i_ConCargoA       = dto.i_ConCargoA;
            entity.i_TicketInterno   = dto.i_TicketInterno;
            entity.d_InsertDate      = dto.d_InsertDate;
            entity.i_UpdateUserId    = dto.i_UpdateUserId;
            entity.d_UpdateDate      = dto.d_UpdateDate;
            entity.v_ComentaryUpdate = dto.v_ComentaryUpdate;

            dto.OnEntity(entity);

            return(entity);
        }
 public ticketdetalleDto(String v_TicketDetalleId, String v_TicketId, String v_Descripcion, String v_IdProductoDetalle, String v_CodInterno, Nullable <Decimal> d_Cantidad, Nullable <Decimal> d_PrecioVenta, Nullable <Decimal> d_SaldoPaciente, Nullable <Decimal> d_SaldoAseguradora, Nullable <Int32> i_EsDespachado, String v_IdUnidadProductiva, Nullable <Int32> i_IsDeleted, Nullable <Int32> i_InsertUserId, Nullable <DateTime> d_InsertDate, Nullable <Int32> i_UpdateUserId, Nullable <DateTime> d_UpdateDate, String v_ComentaryUpdate, ticketDto ticket)
 {
     this.v_TicketDetalleId    = v_TicketDetalleId;
     this.v_TicketId           = v_TicketId;
     this.v_Descripcion        = v_Descripcion;
     this.v_IdProductoDetalle  = v_IdProductoDetalle;
     this.v_CodInterno         = v_CodInterno;
     this.d_Cantidad           = d_Cantidad;
     this.d_PrecioVenta        = d_PrecioVenta;
     this.d_SaldoPaciente      = d_SaldoPaciente;
     this.d_SaldoAseguradora   = d_SaldoAseguradora;
     this.i_EsDespachado       = i_EsDespachado;
     this.v_IdUnidadProductiva = v_IdUnidadProductiva;
     this.i_IsDeleted          = i_IsDeleted;
     this.i_InsertUserId       = i_InsertUserId;
     this.d_InsertDate         = d_InsertDate;
     this.i_UpdateUserId       = i_UpdateUserId;
     this.d_UpdateDate         = d_UpdateDate;
     this.v_ComentaryUpdate    = v_ComentaryUpdate;
     this.ticket = ticket;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="ticket"/> converted from <see cref="ticketDto"/>.</param>
 static partial void OnEntity(this ticketDto dto, ticket entity);
Exemplo n.º 5
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="ticketDto"/> converted from <see cref="ticket"/>.</param>
 static partial void OnDTO(this ticket entity, ticketDto dto);