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

<NavigationItem(False), CreatableItem(False)> _
<Appearance("Hide CurrencyName and CustomersFrom", AppearanceItemType.LayoutItem, "1=1", TargetItems:="CurrencyName;CustomersFrom", visibility:=Editors.ViewItemVisibility.Hide)> _
<DefaultClassOptions()> _
Public Class OrderInHeaderFromOfferOutRowsHeader
    Inherits BaseObject
    Private _OrderInParameters As OrderInParameters ' Bejövő megrendelési paraméter
    Private _CurrencyName As CurrencyName ' Deviza (a popup-on nem látszik, háttérben kell)
    Private _CustomersFrom As CustomersFrom ' Saját cég (a popup-on nem látszik, háttérben kell)

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
    End Sub
    <RuleRequiredField("OrderInHeaderFromOfferOutRowsHeader-OrderInParameters", DefaultContexts.Save)>
    <ImmediatePostData(True), DataSourceCriteria("CustomersFrom='@This.CustomersFrom' AND CurrencyName='@This.CurrencyName'")>
    Property OrderInParameters As OrderInParameters
        Get
            Return _OrderInParameters
        End Get
        Set(value As OrderInParameters)
            SetPropertyValue("OrderInParameters", _OrderInParameters, value)
        End Set
    End Property
    <RuleRequiredField("OrderInHeaderFromOfferOutRowsHeader-CurrencyName", DefaultContexts.Save)> _
    Property CurrencyName As CurrencyName
        Get
            Return _CurrencyName
        End Get
        Set(value As CurrencyName)
            SetPropertyValue("CurrencyName", _CurrencyName, value)
        End Set
    End Property
    Property CustomersFrom As CustomersFrom
        Get
            Return _CustomersFrom
        End Get
        Set(value As CustomersFrom)
            SetPropertyValue("CustomersFrom", _CustomersFrom, value)
        End Set
    End Property
    <VisibleInListView(False)> _
    <Association("OrderInHeaderFromOfferOutRowsHeader-OrderInHeaderFromOfferOutRowsRows", GetType(OrderInHeaderFromOfferOutRowsRows))> _
    ReadOnly Property OrderInHeaderFromOfferOutRowsRows As XPCollection(Of OrderInHeaderFromOfferOutRowsRows)
        Get
            Return GetCollection(Of OrderInHeaderFromOfferOutRowsRows)("OrderInHeaderFromOfferOutRowsRows")

        End Get
    End Property

End Class
