Esempio n. 1
0
        /// <summary>
        /// Converts this instance of <see cref="protocolDto"/> to an instance of <see cref="protocol"/>.
        /// </summary>
        /// <param name="dto"><see cref="protocolDto"/> to convert.</param>
        public static protocol ToEntity(this protocolDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new protocol();

            entity.v_ProtocolId                = dto.v_ProtocolId;
            entity.v_Name                      = dto.v_Name;
            entity.v_EmployerOrganizationId    = dto.v_EmployerOrganizationId;
            entity.v_EmployerLocationId        = dto.v_EmployerLocationId;
            entity.i_EsoTypeId                 = dto.i_EsoTypeId;
            entity.v_GroupOccupationId         = dto.v_GroupOccupationId;
            entity.v_CustomerOrganizationId    = dto.v_CustomerOrganizationId;
            entity.v_CustomerLocationId        = dto.v_CustomerLocationId;
            entity.v_NombreVendedor            = dto.v_NombreVendedor;
            entity.v_WorkingOrganizationId     = dto.v_WorkingOrganizationId;
            entity.v_WorkingLocationId         = dto.v_WorkingLocationId;
            entity.v_CostCenter                = dto.v_CostCenter;
            entity.i_MasterServiceTypeId       = dto.i_MasterServiceTypeId;
            entity.i_MasterServiceId           = dto.i_MasterServiceId;
            entity.i_HasVigency                = dto.i_HasVigency;
            entity.i_ValidInDays               = dto.i_ValidInDays;
            entity.i_IsActive                  = dto.i_IsActive;
            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.v_AseguradoraOrganizationId = dto.v_AseguradoraOrganizationId;
            entity.v_ComentaryUpdate           = dto.v_ComentaryUpdate;
            entity.r_PriceFactor               = dto.r_PriceFactor;
            entity.r_MedicineDiscount          = dto.r_MedicineDiscount;
            entity.r_HospitalBedPrice          = dto.r_HospitalBedPrice;
            entity.r_DiscountExam              = dto.r_DiscountExam;

            dto.OnEntity(entity);

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

            var entity = new protocol();

            entity.v_ProtocolId             = dto.v_ProtocolId;
            entity.v_Name                   = dto.v_Name;
            entity.v_EmployerOrganizationId = dto.v_EmployerOrganizationId;
            entity.v_EmployerLocationId     = dto.v_EmployerLocationId;
            entity.i_EsoTypeId              = dto.i_EsoTypeId;
            entity.v_GroupOccupationId      = dto.v_GroupOccupationId;
            entity.v_CustomerOrganizationId = dto.v_CustomerOrganizationId;
            entity.v_CustomerLocationId     = dto.v_CustomerLocationId;
            entity.v_WorkingOrganizationId  = dto.v_WorkingOrganizationId;
            entity.v_WorkingLocationId      = dto.v_WorkingLocationId;
            entity.v_CostCenter             = dto.v_CostCenter;
            entity.i_MasterServiceTypeId    = dto.i_MasterServiceTypeId;
            entity.i_MasterServiceId        = dto.i_MasterServiceId;
            entity.i_HasVigency             = dto.i_HasVigency;
            entity.i_ValidInDays            = dto.i_ValidInDays;
            entity.i_IsActive               = dto.i_IsActive;
            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.v_NombreVendedor         = dto.v_NombreVendedor;

            dto.OnEntity(entity);

            return(entity);
        }