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

            var dto = new SoChiTieuCuaHangDTO();

            dto.MaCT     = entity.MaCT;
            dto.LyDoChi  = entity.LyDoChi;
            dto.NgayGio  = entity.NgayGio;
            dto.TongTien = entity.TongTien;

            entity.OnDTO(dto);

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

            var entity = new SoChiTieuCuaHang();

            entity.MaCT     = dto.MaCT;
            entity.LyDoChi  = dto.LyDoChi;
            entity.NgayGio  = dto.NgayGio;
            entity.TongTien = dto.TongTien;

            dto.OnEntity(entity);

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