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

            var dto = new componentfieldsDto();

            dto.v_ComponentId      = entity.v_ComponentId;
            dto.v_ComponentFieldId = entity.v_ComponentFieldId;
            dto.v_Group            = entity.v_Group;
            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;

            entity.OnDTO(dto);

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

            var entity = new componentfields();

            entity.v_ComponentId      = dto.v_ComponentId;
            entity.v_ComponentFieldId = dto.v_ComponentFieldId;
            entity.v_Group            = dto.v_Group;
            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;

            dto.OnEntity(entity);

            return(entity);
        }
 public diagnosticrepositoryDto(String v_DiagnosticRepositoryId, String v_ServiceId, String v_DiseasesId, String v_ComponentId, String v_ComponentFieldId, Nullable <Int32> i_AutoManualId, Nullable <Int32> i_PreQualificationId, Nullable <Int32> i_FinalQualificationId, Nullable <Int32> i_DiagnosticTypeId, Nullable <Int32> i_IsSentToAntecedent, Nullable <DateTime> d_ExpirationDateDiagnostic, Nullable <Int32> i_GenerateMedicalBreak, String v_Recomendations, Nullable <Int32> i_DiagnosticSourceId, Nullable <Int32> i_ShapeAccidentId, Nullable <Int32> i_BodyPartId, Nullable <Int32> i_ClassificationOfWorkAccidentId, Nullable <Int32> i_RiskFactorId, Nullable <Int32> i_ClassificationOfWorkdiseaseId, Nullable <Int32> i_SendToInterconsultationId, Nullable <Int32> i_InterconsultationDestinationId, Nullable <Int32> i_IsDeleted, Nullable <Int32> i_InsertUserId, Nullable <DateTime> d_InsertDate, Nullable <Int32> i_UpdateUserId, Nullable <DateTime> d_UpdateDate, String v_InterconsultationDestinationId, String v_ComentaryUpdate, componentfieldsDto componentfields, diseasesDto diseases, serviceDto service, List <recommendationDto> recommendation, List <restrictionDto> restriction)
 {
     this.v_DiagnosticRepositoryId = v_DiagnosticRepositoryId;
     this.v_ServiceId                      = v_ServiceId;
     this.v_DiseasesId                     = v_DiseasesId;
     this.v_ComponentId                    = v_ComponentId;
     this.v_ComponentFieldId               = v_ComponentFieldId;
     this.i_AutoManualId                   = i_AutoManualId;
     this.i_PreQualificationId             = i_PreQualificationId;
     this.i_FinalQualificationId           = i_FinalQualificationId;
     this.i_DiagnosticTypeId               = i_DiagnosticTypeId;
     this.i_IsSentToAntecedent             = i_IsSentToAntecedent;
     this.d_ExpirationDateDiagnostic       = d_ExpirationDateDiagnostic;
     this.i_GenerateMedicalBreak           = i_GenerateMedicalBreak;
     this.v_Recomendations                 = v_Recomendations;
     this.i_DiagnosticSourceId             = i_DiagnosticSourceId;
     this.i_ShapeAccidentId                = i_ShapeAccidentId;
     this.i_BodyPartId                     = i_BodyPartId;
     this.i_ClassificationOfWorkAccidentId = i_ClassificationOfWorkAccidentId;
     this.i_RiskFactorId                   = i_RiskFactorId;
     this.i_ClassificationOfWorkdiseaseId  = i_ClassificationOfWorkdiseaseId;
     this.i_SendToInterconsultationId      = i_SendToInterconsultationId;
     this.i_InterconsultationDestinationId = i_InterconsultationDestinationId;
     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_InterconsultationDestinationId = v_InterconsultationDestinationId;
     this.v_ComentaryUpdate                = v_ComentaryUpdate;
     this.componentfields                  = componentfields;
     this.diseases       = diseases;
     this.service        = service;
     this.recommendation = recommendation;
     this.restriction    = restriction;
 }
 public servicecomponentfieldsDto(String v_ServiceComponentFieldsId, String v_ServiceComponentId, String v_ComponentId, String v_ComponentFieldId, Nullable <Int32> i_IsDeleted, Nullable <Int32> i_InsertUserId, Nullable <DateTime> d_InsertDate, Nullable <Int32> i_UpdateUserId, Nullable <DateTime> d_UpdateDate, servicecomponentDto servicecomponent, componentfieldsDto componentfields, List <servicecomponentfieldvaluesDto> servicecomponentfieldvalues)
 {
     this.v_ServiceComponentFieldsId = v_ServiceComponentFieldsId;
     this.v_ServiceComponentId       = v_ServiceComponentId;
     this.v_ComponentId               = v_ComponentId;
     this.v_ComponentFieldId          = v_ComponentFieldId;
     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.servicecomponent            = servicecomponent;
     this.componentfields             = componentfields;
     this.servicecomponentfieldvalues = servicecomponentfieldvalues;
 }
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="componentfields"/> converted from <see cref="componentfieldsDto"/>.</param>
 static partial void OnEntity(this componentfieldsDto dto, componentfields entity);
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="componentfieldsDto"/> converted from <see cref="componentfields"/>.</param>
 static partial void OnDTO(this componentfields entity, componentfieldsDto dto);