Imports System
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation

Imports DevExpress.ExpressApp.ConditionalAppearance
Imports System.Linq
Imports System.Linq.Expressions

<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
<DefaultProperty("StorageOutRows.StorageOutHeader.DocumentNumber")> _
Public Class StorageOutRowsInRows
    Inherits BaseObject
    Private _RowIndex As Long
    Private _StorageOutRows As StorageOutRows
    Private _StorageInRows As StorageInRows
    Private _QTT As Double 'Kitárolt mennyiség
    Private _QTT_To_DeliveryOut As Double 'Kiszállított mennyiség
    Private _QTT_Will As Double 'Kiszállítási szándék

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Protected Overrides Sub OnSaving()
        MyBase.OnSaving()
        QTT = Math.Round(QTT, 4, MidpointRounding.AwayFromZero)
        QTT_To_DeliveryOut = Math.Round(QTT_To_DeliveryOut, 4, MidpointRounding.AwayFromZero)
        QTT_Will = Math.Round(QTT_Will, 4, MidpointRounding.AwayFromZero)
    End Sub
    Property RowIndex As Long
        Get
            Return _RowIndex
        End Get
        Set(ByVal value As Long)
            SetPropertyValue("RowIndex", _RowIndex, value)
        End Set
    End Property
    <Association("StorageOutIn", GetType(StorageOutRows))> _
    Property StorageOutRows() As StorageOutRows
        Get
            Return _StorageOutRows
        End Get
        Set(ByVal value As StorageOutRows)
            SetPropertyValue("StorageOutRows", _StorageOutRows, value)
        End Set
    End Property
    Property StorageInRows() As StorageInRows
        Get
            Return _StorageInRows
        End Get
        Set(ByVal value As StorageInRows)
            SetPropertyValue("StorageInRows", _StorageInRows, value)
        End Set
    End Property
    Property QTT() As Double
        Get
            Return _QTT
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("QTT", _QTT, value)
        End Set
    End Property
    Property QTT_To_DeliveryOut As Double
        Get
            Return _QTT_To_DeliveryOut
        End Get
        Set(value As Double)
            SetPropertyValue("QTT_To_DeliveryOut", _QTT_To_DeliveryOut, value)
        End Set
    End Property
    Property QTT_Will As Double
        Get
            Return _QTT_Will
        End Get
        Set(value As Double)
            SetPropertyValue("QTT_Will", _QTT_Will, value)
        End Set
    End Property
End Class
