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

<DefaultClassOptions()> _
<NavigationItem(False)> _
<CreatableItem(False)> _
<NonPersistent()> _
<Appearance("ORI_ChangeQTT_PopUp - Disable QTT_Storaged_Will;QTT_Storaged all time", AppearanceItemType.ViewItem, "1=1", TargetItems:="QTT_Storaged_Will;QTT_Storaged", Enabled:=False)> _
<Appearance("ORI_ChangeQTT_PopUp - Hide OrderInRows all time", TargetItems:="OrderInRows", Criteria:="1=1", Enabled:=False, Context:="DetailView")> _
Public Class ORI_ChangeQTT_PopUp
    Inherits BaseObject

    Private _QTT As Double
    Private _QTT_Storaged_Will As Double '-- Kitárolásra foglalt mennyiség
    Private _QTT_Storaged As Double '-- Kiadott mennyiség
    Private _OrderInRows As OrderInRows

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
    End Sub

    Property QTT() As Double
        Get
            Return _QTT
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("QTT", _QTT, value)
        End Set
    End Property
    Property QTT_Storaged_Will As Double
        Get
            Return _QTT_Storaged_Will
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("QTT_Storaged_Will", _QTT_Storaged_Will, value)
        End Set
    End Property
    Property OrderInRows As OrderInRows
        Get
            Return _OrderInRows
        End Get
        Set(value As OrderInRows)
            SetPropertyValue("OrderInRows", _OrderInRows, value)
        End Set
    End Property
    Property QTT_Storaged() As Double
        Get
            Return _QTT_Storaged
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("QTT_Storaged", _QTT_Storaged, value)
        End Set
    End Property
    ReadOnly Property AuditDataItemPersistent_Collection As XPCollection(Of AuditDataItemPersistent)
        Get
            If OrderInRows IsNot Nothing Then
                Dim _AuditDataItemPersistent_Return_Collection As XPCollection(Of AuditDataItemPersistent)
                _AuditDataItemPersistent_Return_Collection = AuditedObjectWeakReference.GetAuditTrail(Session, OrderInRows)

                Return _AuditDataItemPersistent_Return_Collection
            Else
                Return Nothing
            End If
        End Get
    End Property
End Class
