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

            var dto = new productwarehouseDto();

            dto.v_WarehouseId  = entity.v_WarehouseId;
            dto.v_ProductId    = entity.v_ProductId;
            dto.r_StockMin     = entity.r_StockMin;
            dto.r_StockMax     = entity.r_StockMax;
            dto.r_StockActual  = entity.r_StockActual;
            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);
        }
Example #2
0
        /// <summary>
        /// Converts this instance of <see cref="productwarehouseDto"/> to an instance of <see cref="productwarehouse"/>.
        /// </summary>
        /// <param name="dto"><see cref="productwarehouseDto"/> to convert.</param>
        public static productwarehouse ToEntity(this productwarehouseDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new productwarehouse();

            entity.v_WarehouseId  = dto.v_WarehouseId;
            entity.v_ProductId    = dto.v_ProductId;
            entity.r_StockMin     = dto.r_StockMin;
            entity.r_StockMax     = dto.r_StockMax;
            entity.r_StockActual  = dto.r_StockActual;
            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);
        }
Example #3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="productwarehouse"/> converted from <see cref="productwarehouseDto"/>.</param>
 static partial void OnEntity(this productwarehouseDto dto, productwarehouse entity);
Example #4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="productwarehouseDto"/> converted from <see cref="productwarehouse"/>.</param>
 static partial void OnDTO(this productwarehouse entity, productwarehouseDto dto);