예제 #1
0
        /// <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);
        }
예제 #2
0
 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, warehouseDto warehouse, productDto product)
 {
     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.warehouse      = warehouse;
     this.product        = product;
 }
 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, warehouseDto warehouse, productDto product)
 {
     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.warehouse        = warehouse;
     this.product          = product;
 }
예제 #4
0
        /// <summary>
        /// Converts this instance of <see cref="productDto"/> to an instance of <see cref="product"/>.
        /// </summary>
        /// <param name="dto"><see cref="productDto"/> to convert.</param>
        public static product ToEntity(this productDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new product();

            entity.v_ProductId             = dto.v_ProductId;
            entity.i_CategoryId            = dto.i_CategoryId;
            entity.v_Name                  = dto.v_Name;
            entity.v_GenericName           = dto.v_GenericName;
            entity.v_BarCode               = dto.v_BarCode;
            entity.v_ProductCode           = dto.v_ProductCode;
            entity.v_Brand                 = dto.v_Brand;
            entity.v_Model                 = dto.v_Model;
            entity.v_SerialNumber          = dto.v_SerialNumber;
            entity.d_ExpirationDate        = dto.d_ExpirationDate;
            entity.i_MeasurementUnitId     = dto.i_MeasurementUnitId;
            entity.r_ReferentialCostPrice  = dto.r_ReferentialCostPrice;
            entity.r_ReferentialSalesPrice = dto.r_ReferentialSalesPrice;
            entity.v_Presentation          = dto.v_Presentation;
            entity.v_AdditionalInformation = dto.v_AdditionalInformation;
            entity.b_Image                 = dto.b_Image;
            entity.i_IsDeleted             = dto.i_IsDeleted;
            entity.i_InsertUserId          = dto.i_InsertUserId;
            entity.d_InsertDate            = dto.d_InsertDate;
            entity.i_UpdateUserId          = dto.i_UpdateUserId;
            entity.d_UpdateDate            = dto.d_UpdateDate;
            entity.v_ComentaryUpdate       = dto.v_ComentaryUpdate;

            dto.OnEntity(entity);

            return(entity);
        }
예제 #5
0
 /// <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);
예제 #6
0
 /// <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);