Beispiel #1
0
        /// <summary>
        /// Converts this instance of <see cref="ChiTietSBH"/> to an instance of <see cref="ChiTietSBHDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="ChiTietSBH"/> to convert.</param>
        public static ChiTietSBHDTO ToDTO(this ChiTietSBH entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new ChiTietSBHDTO();

            dto.MaCTSBH   = entity.MaCTSBH;
            dto.MaSBH     = entity.MaSBH;
            dto.NgayTra   = entity.NgayTra;
            dto.ThanhTien = entity.ThanhTien;

            entity.OnDTO(dto);

            return(dto);
        }
Beispiel #2
0
        /// <summary>
        /// Converts this instance of <see cref="ChiTietSBHDTO"/> to an instance of <see cref="ChiTietSBH"/>.
        /// </summary>
        /// <param name="dto"><see cref="ChiTietSBHDTO"/> to convert.</param>
        public static ChiTietSBH ToEntity(this ChiTietSBHDTO dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new ChiTietSBH();

            entity.MaCTSBH   = dto.MaCTSBH;
            entity.MaSBH     = dto.MaSBH;
            entity.NgayTra   = dto.NgayTra;
            entity.ThanhTien = dto.ThanhTien;

            dto.OnEntity(entity);

            return(entity);
        }
Beispiel #3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="ChiTietSBH"/> converted from <see cref="ChiTietSBHDTO"/>.</param>
 static partial void OnEntity(this ChiTietSBHDTO dto, ChiTietSBH entity);
Beispiel #4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="ChiTietSBHDTO"/> converted from <see cref="ChiTietSBH"/>.</param>
 static partial void OnDTO(this ChiTietSBH entity, ChiTietSBHDTO dto);