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()> _
<NonPersistent()> _
<NavigationItem(False), CreatableItem(False)> _
<RuleCriteria("BankImportPopup-ChartOfAccounts", DefaultContexts.Save, "ChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
Public Class BankImportPopup
    Inherits BaseObject
    Private _TransactionType As eTransactionType
    Private _ChartOfAccounts As ChartOfAccounts
    Private _Controlling As Controlling
    Private _Customers As Customers
    Private _ConnectInfo As String
    Private _AmountHUF As Double = 0
    Private _AmountDEV As Double = 0
    Private _AmountDEV2 As Double = 0
    Private _CurrencyName2 As CurrencyName
    Private _PCIGroup As PCIGroup
    Private _NoteRows As String

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
    End Sub
    Property TransactionType As eTransactionType
        Get
            Return _TransactionType
        End Get
        Set(value As eTransactionType)
            SetPropertyValue("TransactionType", _TransactionType, value)
        End Set
    End Property
    <RuleRequiredField("Require BankImportPopup-ChartOfAccounts", DefaultContexts.Save)>
    <ImmediatePostData(True), DataSourceCriteria("AccountYear=GetYear('@This.PCIGroup.DateExecution_Account')")>
    Property ChartOfAccounts As ChartOfAccounts
        Get
            Return _ChartOfAccounts
        End Get
        Set(value As ChartOfAccounts)
            SetPropertyValue("ChartOfAccounts", _ChartOfAccounts, value)
        End Set
    End Property
    <ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
    Property Controlling As Controlling
        Get
            Return _Controlling
        End Get
        Set(value As Controlling)
            SetPropertyValue("Controlling", _Controlling, 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 ConnectInfo As String
        Get
            Return _ConnectInfo
        End Get
        Set(value As String)
            SetPropertyValue("ConnectInfo", _ConnectInfo, value)
        End Set
    End Property
    Property AmountHUF As Double
        Get
            Return _AmountHUF
        End Get
        Set(value As Double)
            SetPropertyValue("AmountHUF", _AmountHUF, value)
        End Set
    End Property
    Property AmountDEV As Double
        Get
            Return _AmountDEV
        End Get
        Set(value As Double)
            SetPropertyValue("AmountDEV", _AmountDEV, value)
        End Set
    End Property
    Property AmountDEV2 As Double
        Get
            Return _AmountDEV2
        End Get
        Set(value As Double)
            SetPropertyValue("AmountDEV2", _AmountDEV2, value)
        End Set
    End Property
    Property CurrencyName2 As CurrencyName
        Get
            Return _CurrencyName2
        End Get
        Set(value As CurrencyName)
            SetPropertyValue("CurrencyName2", _CurrencyName2, value)
        End Set
    End Property
    Property PCIGroup As PCIGroup
        Get
            Return _PCIGroup
        End Get
        Set(value As PCIGroup)
            SetPropertyValue("PCIGroup", _PCIGroup, value)
        End Set
    End Property
    <Size(-1)> _
    Property NoteRows As String
        Get
            Return _NoteRows
        End Get
        Set(value As String)
            SetPropertyValue("NoteRows", _NoteRows, value)
        End Set
    End Property
End Class
