/// <summary>
        /// Converts this instance of <see cref="serviceorder"/> to an instance of <see cref="serviceorderDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="serviceorder"/> to convert.</param>
        public static serviceorderDto ToDTO(this serviceorder entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new serviceorderDto();

            dto.v_ServiceOrderId       = entity.v_ServiceOrderId;
            dto.v_CustomServiceOrderId = entity.v_CustomServiceOrderId;
            dto.v_Description          = entity.v_Description;
            dto.v_Comentary            = entity.v_Comentary;
            dto.i_NumberOfWorker       = entity.i_NumberOfWorker;
            dto.r_TotalCost            = entity.r_TotalCost;
            dto.d_DeliveryDate         = entity.d_DeliveryDate;
            dto.i_ServiceOrderStatusId = entity.i_ServiceOrderStatusId;
            dto.i_LineaCreditoId       = entity.i_LineaCreditoId;
            dto.i_IsDeleted            = entity.i_IsDeleted;
            dto.i_InsertUserId         = entity.i_InsertUserId;
            dto.d_InsertDate           = entity.d_InsertDate;
            dto.i_UpdateUserId         = entity.i_UpdateUserId;
            dto.d_UpdateDate           = entity.d_UpdateDate;
            dto.i_MostrarPrecio        = entity.i_MostrarPrecio;
            dto.i_EsProtocoloEspecial  = entity.i_EsProtocoloEspecial;

            entity.OnDTO(dto);

            return(dto);
        }
        /// <summary>
        /// Converts this instance of <see cref="serviceorderDto"/> to an instance of <see cref="serviceorder"/>.
        /// </summary>
        /// <param name="dto"><see cref="serviceorderDto"/> to convert.</param>
        public static serviceorder ToEntity(this serviceorderDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new serviceorder();

            entity.v_ServiceOrderId       = dto.v_ServiceOrderId;
            entity.v_CustomServiceOrderId = dto.v_CustomServiceOrderId;
            entity.v_Description          = dto.v_Description;
            entity.v_Comentary            = dto.v_Comentary;
            entity.i_NumberOfWorker       = dto.i_NumberOfWorker;
            entity.r_TotalCost            = dto.r_TotalCost;
            entity.d_DeliveryDate         = dto.d_DeliveryDate;
            entity.i_ServiceOrderStatusId = dto.i_ServiceOrderStatusId;
            entity.i_LineaCreditoId       = dto.i_LineaCreditoId;
            entity.i_IsDeleted            = dto.i_IsDeleted;
            entity.i_InsertUserId         = dto.i_InsertUserId;
            entity.d_InsertDate           = dto.d_InsertDate;
            entity.i_UpdateUserId         = dto.i_UpdateUserId;
            entity.d_UpdateDate           = dto.d_UpdateDate;
            entity.i_MostrarPrecio        = dto.i_MostrarPrecio;
            entity.i_EsProtocoloEspecial  = dto.i_EsProtocoloEspecial;

            dto.OnEntity(entity);

            return(entity);
        }
示例#3
0
 public serviceorderdetailDto(String v_ServiceOrderDetailId, String v_ServiceOrderId, String v_ProtocolId, Nullable <Int32> i_IsDeleted, Nullable <Int32> i_InsertUserId, Nullable <DateTime> d_InsertDate, Nullable <Int32> i_UpdateUserId, Nullable <DateTime> d_UpdateDate, Nullable <Single> r_ProtocolPrice, Nullable <Int32> i_NumberOfWorkerProtocol, Nullable <Single> r_Total, serviceorderDto serviceorder, protocolDto protocol)
 {
     this.v_ServiceOrderDetailId   = v_ServiceOrderDetailId;
     this.v_ServiceOrderId         = v_ServiceOrderId;
     this.v_ProtocolId             = v_ProtocolId;
     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.r_ProtocolPrice          = r_ProtocolPrice;
     this.i_NumberOfWorkerProtocol = i_NumberOfWorkerProtocol;
     this.r_Total      = r_Total;
     this.serviceorder = serviceorder;
     this.protocol     = protocol;
 }
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="serviceorder"/> converted from <see cref="serviceorderDto"/>.</param>
 static partial void OnEntity(this serviceorderDto dto, serviceorder entity);
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="serviceorderDto"/> converted from <see cref="serviceorder"/>.</param>
 static partial void OnDTO(this serviceorder entity, serviceorderDto dto);