/// <summary>
        /// Converts this instance of <see cref="product"/> to an instance of <see cref="productDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="product"/> to convert.</param>
        public static productDto ToDTO(this product entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new productDto();

            dto.v_ProductId             = entity.v_ProductId;
            dto.i_CategoryId            = entity.i_CategoryId;
            dto.v_Name                  = entity.v_Name;
            dto.v_GenericName           = entity.v_GenericName;
            dto.v_BarCode               = entity.v_BarCode;
            dto.v_ProductCode           = entity.v_ProductCode;
            dto.v_Brand                 = entity.v_Brand;
            dto.v_Model                 = entity.v_Model;
            dto.v_SerialNumber          = entity.v_SerialNumber;
            dto.d_ExpirationDate        = entity.d_ExpirationDate;
            dto.i_MeasurementUnitId     = entity.i_MeasurementUnitId;
            dto.r_ReferentialCostPrice  = entity.r_ReferentialCostPrice;
            dto.r_ReferentialSalesPrice = entity.r_ReferentialSalesPrice;
            dto.v_Presentation          = entity.v_Presentation;
            dto.v_AdditionalInformation = entity.v_AdditionalInformation;
            dto.b_Image                 = entity.b_Image;
            dto.i_IsDeleted             = entity.i_IsDeleted;
            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);
        }
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="product"/> converted from <see cref="productDto"/>.</param>
 static partial void OnEntity(this productDto dto, product entity);
Exemplo n.º 3
0
 public movementdetailDto(String v_MovementId, String v_ProductId, String v_WarehouseId, Nullable <Single> r_StockMax, Nullable <Single> r_StockMin, Nullable <Int32> i_MovementTypeId, Nullable <Single> r_Quantity, Nullable <Single> r_Price, Nullable <Single> r_SubTotal, Nullable <DateTime> d_UpdateDate, movementDto movement, productDto product, warehouseDto warehouse)
 {
     this.v_MovementId     = v_MovementId;
     this.v_ProductId      = v_ProductId;
     this.v_WarehouseId    = v_WarehouseId;
     this.r_StockMax       = r_StockMax;
     this.r_StockMin       = r_StockMin;
     this.i_MovementTypeId = i_MovementTypeId;
     this.r_Quantity       = r_Quantity;
     this.r_Price          = r_Price;
     this.r_SubTotal       = r_SubTotal;
     this.d_UpdateDate     = d_UpdateDate;
     this.movement         = movement;
     this.product          = product;
     this.warehouse        = warehouse;
 }
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="productDto"/> converted from <see cref="product"/>.</param>
 static partial void OnDTO(this product entity, productDto dto);
 public productwarehouseDto(String v_WarehouseId, String v_ProductId, Nullable <Single> r_StockMin, Nullable <Single> r_StockMax, Nullable <Single> r_StockActual, Nullable <Int32> i_InsertUserId, Nullable <DateTime> d_InsertDate, Nullable <Int32> i_UpdateUserId, Nullable <DateTime> d_UpdateDate, productDto product, warehouseDto warehouse)
 {
     this.v_WarehouseId  = v_WarehouseId;
     this.v_ProductId    = v_ProductId;
     this.r_StockMin     = r_StockMin;
     this.r_StockMax     = r_StockMax;
     this.r_StockActual  = r_StockActual;
     this.i_InsertUserId = i_InsertUserId;
     this.d_InsertDate   = d_InsertDate;
     this.i_UpdateUserId = i_UpdateUserId;
     this.d_UpdateDate   = d_UpdateDate;
     this.product        = product;
     this.warehouse      = warehouse;
 }