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

            var dto = new warehouseDto();

            dto.v_WarehouseId           = entity.v_WarehouseId;
            dto.v_OrganizationId        = entity.v_OrganizationId;
            dto.v_LocationId            = entity.v_LocationId;
            dto.v_Name                  = entity.v_Name;
            dto.v_AdditionalInformation = entity.v_AdditionalInformation;
            dto.i_CostCenterId          = entity.i_CostCenterId;
            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);
        }