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), DeferredDeletion(False)> _
Public Class DBCTables
    Inherits BaseObject

    Private _DBCType As Long
    Private _DBCLogin As DBCLogin
    Private _TableName As String
    Private _CreateScript As String
    Private _DropScript As String
    Private _DBCTableCount As Long
    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
    End Sub

    Property DBCType As Long
        Get
            Return _DBCType
        End Get
        Set(value As Long)
            SetPropertyValue("DBCType", _DBCType, value)
        End Set
    End Property
    Property DBCLogin As DBCLogin
        Get
            Return _DBCLogin
        End Get
        Set(value As DBCLogin)
            SetPropertyValue("DBCLogin", _DBCLogin, value)
        End Set
    End Property
    <Size(255)> _
    Property TableName As String
        Get
            Return _TableName
        End Get
        Set(value As String)
            SetPropertyValue("TableName", _TableName, value)
        End Set
    End Property
    <Size(-1)> _
    Property CreateScript As String
        Get
            Return _CreateScript
        End Get
        Set(value As String)
            SetPropertyValue("CreateScript", _CreateScript, value)
        End Set
    End Property
    <Size(-1)> _
    Property DropScript As String
        Get
            Return _DropScript
        End Get
        Set(value As String)
            SetPropertyValue("DropScript", _DropScript, value)
        End Set
    End Property
    Property DBCTableCount As Long
        Get
            Return _DBCTableCount
        End Get
        Set(value As Long)
            SetPropertyValue("DBCTableCount", _DBCTableCount, value)
        End Set
    End Property

    <VisibleInListView(False), VisibleInLookupListView(False)> _
    ReadOnly Property DBCColumns As XPCollection(Of DBCColumns)
        Get
            Return New XPCollection(Of DBCColumns)(Session, CriteriaOperator.Parse("DBCTables=?", Me))
        End Get
    End Property
End Class
