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

            var dto = new personmedicalhistoryDto();

            dto.v_PersonMedicalHistoryId = entity.v_PersonMedicalHistoryId;
            dto.v_PersonId         = entity.v_PersonId;
            dto.v_DiseasesId       = entity.v_DiseasesId;
            dto.i_TypeDiagnosticId = entity.i_TypeDiagnosticId;
            dto.d_StartDate        = entity.d_StartDate;
            dto.v_DiagnosticDetail = entity.v_DiagnosticDetail;
            dto.v_TreatmentSite    = entity.v_TreatmentSite;
            dto.i_AnswerId         = entity.i_AnswerId;
            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);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Converts this instance of <see cref="personmedicalhistoryDto"/> to an instance of <see cref="personmedicalhistory"/>.
        /// </summary>
        /// <param name="dto"><see cref="personmedicalhistoryDto"/> to convert.</param>
        public static personmedicalhistory ToEntity(this personmedicalhistoryDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new personmedicalhistory();

            entity.v_PersonMedicalHistoryId = dto.v_PersonMedicalHistoryId;
            entity.v_PersonId         = dto.v_PersonId;
            entity.v_DiseasesId       = dto.v_DiseasesId;
            entity.i_TypeDiagnosticId = dto.i_TypeDiagnosticId;
            entity.d_StartDate        = dto.d_StartDate;
            entity.v_DiagnosticDetail = dto.v_DiagnosticDetail;
            entity.v_TreatmentSite    = dto.v_TreatmentSite;
            entity.i_AnswerId         = dto.i_AnswerId;
            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);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="personmedicalhistory"/> converted from <see cref="personmedicalhistoryDto"/>.</param>
 static partial void OnEntity(this personmedicalhistoryDto dto, personmedicalhistory entity);
Exemplo n.º 4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="personmedicalhistoryDto"/> converted from <see cref="personmedicalhistory"/>.</param>
 static partial void OnDTO(this personmedicalhistory entity, personmedicalhistoryDto dto);