Example #1
0
        public static PropellingMovementManager ToEntity(this PropellingMovementManagerDto dto)
        {
            PropellingMovementManager entity = null;

            if (dto != null)
            {
                entity = new PropellingMovementManager()
                {
                    ID            = dto.ID,
                    ServiceNumber = dto.ServiceNumber,
                    ClientSecret  = dto.ClientSecret,
                    IsEnable      = (byte)(dto.IsEnable ? 1 : 0),
                    CreatedBy     = dto.CreatedBy,
                    CreatedTime   = dto.CreatedTime,
                    DomainName    = dto.DomainName,
                    ModifiedBy    = dto.ModifiedBy,
                    ModifiedTime  = dto.ModifiedTime,
                    ServiceSign   = dto.ServiceNumber,
                    PropeMoveID   = dto.PropeMoveID
                };
            }
            return(entity);
        }
Example #2
0
        public static PropellingMovementManagerDto ToDto(this PropellingMovementManager entity)
        {
            PropellingMovementManagerDto dto = null;

            if (entity != null)
            {
                dto = new PropellingMovementManagerDto()
                {
                    ID            = entity.ID,
                    ServiceNumber = entity.ServiceNumber,
                    ClientSecret  = entity.ClientSecret,
                    IsEnable      = entity.IsEnable > 0,
                    CreatedBy     = entity.CreatedBy,
                    CreatedTime   = entity.CreatedTime,
                    DomainName    = entity.DomainName,
                    ModifiedBy    = entity.ModifiedBy,
                    ModifiedTime  = entity.ModifiedTime,
                    ServiceSign   = entity.ServiceNumber,
                    PropeMoveID   = entity.PropeMoveID
                };
            }
            return(dto);
        }