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

<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
Public Class InvoiceFactoringBank
    Inherits BaseObject

    Private _CustomersFrom As CustomersFrom
    Private _Customers As Customers
    Private _Factoring_Send_Number As String 'Bankba küldés sorszáma
    Private _FileData As FileData 'Csatolt dokumentum
    Private _Factoring_Send_Date As Date 'Beküldés dátuma

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
        ' This constructor is used when an object is loaded from a persistent storage.
        ' Do not place any code here or place it only when the IsLoading property is false:
        ' if (!IsLoading){
        '   It is now OK to place your initialization code here.
        ' }
        ' or as an alternative, move your initialization code into the AfterConstruction method.
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
        ' Place here your initialization code.
    End Sub


    Property CustomersFrom As CustomersFrom
        Get
            Return _CustomersFrom
        End Get
        Set(value As CustomersFrom)
            SetPropertyValue("CustomersFrom", _CustomersFrom, value)
        End Set
    End Property
    Property Customers As Customers
        Get
            Return _Customers
        End Get
        Set(value As Customers)
            SetPropertyValue("Customers", _Customers, value)
        End Set
    End Property
    Property Factoring_Send_Number As String
        Get
            Return _Factoring_Send_Number
        End Get
        Set(value As String)
            SetPropertyValue("Factoring_Send_Number", _Factoring_Send_Number, value)
        End Set
    End Property
    Property Factoring_Send_Date As Date
        Get
            Return _Factoring_Send_Date
        End Get
        Set(value As Date)
            SetPropertyValue("Factoring_Send_Date", _Factoring_Send_Date, value)
        End Set
    End Property
    Property FileData As FileData
        Get
            Return _FileData
        End Get
        Set(value As FileData)
            SetPropertyValue("FileData", _FileData, value)
        End Set
    End Property

    ReadOnly Property InvoiceHeader As XPCollection(Of InvoiceHeader)
        Get
            Return New XPCollection(Of InvoiceHeader)(Session, CriteriaOperator.Parse("InvoiceFactoringBank=?", Me))
        End Get
    End Property
End Class
