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("GeneralStock")> _
Public Class RegistryType '-- Iktató tipusok
    Inherits BaseObject
    Private _RegistryMainType As eRegistryMainType
    Private _RegistryGLAccount As Boolean
    Private _RegistryDirection As eRegistryDirection
    Private _RegistryCRMType As eRegistryCRMType
    Private _ShortName As String
    Private _WorkflowSystem As WorkflowSystem
    Private _NumberGenerator As NumberGenerator
    Private _CustomersFrom As CustomersFrom
    Private _DefaultDirectory As String 'Alapértelmezett könyvtár, ahonnan a csatolás menni fog
    Private _Rule5DMatrix As Rule5DMatrix
    Private _AutomaticSetResponsible As Boolean
    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
        RegistryGLAccount = False
        Me.AutomaticSetResponsible = False
    End Sub
    Property RegistryGLAccount As Boolean
        Get
            Return _RegistryGLAccount
        End Get
        Set(value As Boolean)
            SetPropertyValue("RegistryGLAccount", _RegistryGLAccount, value)
        End Set
    End Property
    Property RegistryMainType As eRegistryMainType
        Get
            Return _RegistryMainType
        End Get
        Set(ByVal value As eRegistryMainType)
            SetPropertyValue("RegistryMainType", _RegistryMainType, value)
        End Set
    End Property
    Property RegistryDirection() As eRegistryDirection
        Get
            Return _RegistryDirection
        End Get
        Set(ByVal value As eRegistryDirection)
            SetPropertyValue("RegistryDirection", _RegistryDirection, value)
        End Set
    End Property
    Property ShortName() As String
        Get
            Return _ShortName
        End Get
        Set(ByVal value As String)
            SetPropertyValue("ShortName", _ShortName, value)
        End Set
    End Property
    <RuleRequiredField("RegistryType-WorkflowSystem", DefaultContexts.Save)>
    <ImmediatePostData(True), DataSourceCriteria("CustomersFrom = '@This.CustomersFrom'")>
    Property WorkflowSystem() As WorkflowSystem
        Get
            Return _WorkflowSystem
        End Get
        Set(ByVal value As WorkflowSystem)
            SetPropertyValue("WorkflowSystem", _WorkflowSystem, value)
        End Set
    End Property
    <RuleRequiredField("", DefaultContexts.Save)> _
    Property NumberGenerator() As NumberGenerator
        Get
            Return _NumberGenerator
        End Get
        Set(ByVal value As NumberGenerator)
            SetPropertyValue("NumberGenerator", _NumberGenerator, value)
        End Set
    End Property
    <RuleRequiredField("RegistryType-CustomersFrom", DefaultContexts.Save)> _
    Property CustomersFrom As CustomersFrom
        Get
            Return _CustomersFrom
        End Get
        Set(ByVal value As CustomersFrom)
            SetPropertyValue("CustomersFrom", _CustomersFrom, value)
        End Set
    End Property
    Property DefaultDirectory As String
        Get
            Return _DefaultDirectory
        End Get
        Set(ByVal value As String)
            SetPropertyValue("DefaultDirectory", _DefaultDirectory, value)
        End Set
    End Property
    Property RegistryCRMType As eRegistryCRMType
        Get
            Return _RegistryCRMType
        End Get
        Set(value As eRegistryCRMType)
            SetPropertyValue("RegistryCRMType", _RegistryCRMType, value)
        End Set
    End Property
    Property Rule5DMatrix As Rule5DMatrix
        Get
            Return _Rule5DMatrix
        End Get
        Set(value As Rule5DMatrix)
            SetPropertyValue("Rule5DMatrix", _Rule5DMatrix, value)
        End Set
    End Property
    Property AutomaticSetResponsible As Boolean
        Get
            Return _AutomaticSetResponsible
        End Get
        Set(value As Boolean)
            SetPropertyValue("AutomaticSetResponsible", _AutomaticSetResponsible, value)
        End Set
    End Property
End Class

