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("ShowStorageOutDeliveryOutRows_PopUp - HIde OrderInRows all time", AppearanceItemType.ViewItem, "1=1", TargetItems:="OrderInRows", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class ShowStorageOutDeliveryOutRows_PopUp
    Inherits BaseObject

    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 OrderInRows As OrderInRows
        Get
            Return _OrderInRows
        End Get
        Set(value As OrderInRows)
            SetPropertyValue("OrderInRows", _OrderInRows, value)
        End Set
    End Property

    ReadOnly Property StorageOutRowsInRows_Collection As XPCollection(Of StorageOutRowsInRows)
        Get
            Return New XPCollection(Of StorageOutRowsInRows)(Session, CriteriaOperator.Parse("StorageOutRows.OrderInRows.Oid=?", OrderInRows))
        End Get
    End Property
    ReadOnly Property DeliveryNoteOutRows As XPCollection(Of DeliveryNoteOutRows)
        Get
            Return New XPCollection(Of DeliveryNoteOutRows)(Session, CriteriaOperator.Parse("StorageOutRowsInRows.StorageOutRows.OrderInRows=?", OrderInRows))
        End Get
    End Property
    ReadOnly Property DeliveryNoteInRows As XPCollection(Of DeliveryNoteInRows)
        Get
            Return New XPCollection(Of DeliveryNoteInRows)(Session, CriteriaOperator.Parse("Products=? AND QTT <> QTT_Controlled", OrderInRows.Products))
        End Get
    End Property
End Class
