Option Strict On
Option Explicit On

Imports MicroFour.StrataFrame.Business
Imports MicroFour.StrataFrame.Security
Imports MicroFour.StrataFrame.UI.Windows.Forms
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.IO

Partial Public Class MyTableBO

#Region " Component Implementation "

    <System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If (disposing _
           AndAlso (Not (Me.components) Is Nothing)) Then
            Me.components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Component Designer
    'It can be modified using the Component Designer.
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Private Sub InitializeComponent()
        Dim RequiredField1 As MicroFour.StrataFrame.Business.RequiredField = New MicroFour.StrataFrame.Business.RequiredField
        Dim RequiredField2 As MicroFour.StrataFrame.Business.RequiredField = New MicroFour.StrataFrame.Business.RequiredField
        '
        'MyTableBO
        '
        Me.InsertUsingStoredProcedure = True
        RequiredField1.FieldName = "mt_fname"
        RequiredField1.FieldType = System.Data.SqlDbType.Text
        RequiredField2.FieldName = "mt_lname"
        RequiredField2.FieldType = System.Data.SqlDbType.Text
        Me.RequiredFields.AddRange(New MicroFour.StrataFrame.Business.RequiredField() {RequiredField1, RequiredField2})
        Me.RowVersionOrTimestampColumn = "mt_Version"
        Me.UpdateConcurrencyType = MicroFour.StrataFrame.Data.ConcurrencyTypeOptions.OptimisticRowVersion
        Me.UpdateUsingStoredProcedure = True

    End Sub

#End Region

#Region " BusinessLayer Overriden Methods & Properties "

    ''' <summary>
    ''' The collection of required fields for the business object.
    ''' </summary>
    ''' <remarks></remarks>
    <Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
    Public Overrides Property RequiredFields() As RequiredFieldsCollection
        Get
            Return MyBase.RequiredFields
        End Get
        Set(ByVal value As RequiredFieldsCollection)
            MyBase.RequiredFields = value
        End Set
    End Property

    ''' <summary>
    ''' Defines the constraint that defines the parent-child relationship between this business object type and another business object type.
    ''' </summary>
    ''' <remarks></remarks>
    <Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
    Public Overrides Property ParentRelationship() As IBusinessParentRelationship
        Get
            Return MyBase.ParentRelationship
        End Get
        Set(ByVal value As IBusinessParentRelationship)
            MyBase.ParentRelationship = value
        End Set
    End Property

    ''' <summary>
    ''' Returns all of the field names in a single string in the form of [field1],[field2],...  This must be used in the place of '*' in select statements if Query Notifications are to be registered.
    ''' </summary>
    ''' <remarks></remarks>
    Protected Overrides ReadOnly Property AllFieldNames() As String
        Get
            Return "[mt_pk],[mt_fname],[mt_lname],[mt_Created],[mt_Address1],[mt_City],[mt_Version]"
        End Get
    End Property

    ''' <summary>
    ''' The name of the database that contains the table to which this business object is mapped.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides ReadOnly Property Database() As String
        Get
            Return "MyDatabase"
        End Get
    End Property

    Private Shared _PrimaryKeyFields As String() = New String() {"mt_pk"}
    ''' <summary>
    ''' Gets the field or fields that comprise the primary key for the business object.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides ReadOnly Property PrimaryKeyFields() As String()
        Get
            Return _PrimaryKeyFields
        End Get
    End Property

    ''' <summary>
    ''' The name of the table in the database to which this business object is mapped.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides ReadOnly Property TableName() As String
        Get
            Return "MyTable"
        End Get
    End Property

    ''' <summary>
    ''' The schema of the table in the database to which this business object is mapped.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides ReadOnly Property TableSchema() As String
        Get
            Return "dbo"
        End Get
    End Property

    ''' <summary>
    ''' Creates and returns an array of DataColumns that contains the schema for the table.  This is used to prevent a round trip to the server to aquire the initial schema for the internal DataTable.
    ''' </summary>
    ''' <remarks></remarks>
    Protected Overrides Function CreateTableSchema() As DataColumn()
        Return New DataColumn() { _
        New DataColumn("mt_pk", GetType(System.Int32)), _
        New DataColumn("mt_fname", GetType(System.String)), _
        New DataColumn("mt_lname", GetType(System.String)), _
        New DataColumn("mt_Created", GetType(System.DateTime)), _
        New DataColumn("mt_Address1", GetType(System.String)), _
        New DataColumn("mt_City", GetType(System.String)), _
        New DataColumn("mt_Version", GetType(System.Int32))}
    End Function

    ''' <summary>
    ''' Adds a broken rule to the business object's collection
    ''' </summary>
    ''' <remarks></remarks>
    Protected Shadows Sub AddBrokenRule(ByVal Field As MyTableBOFieldNames, ByVal ErrorMessage As String)
        MyBase.AddBrokenRule(Field, ErrorMessage)
    End Sub

    ''' <summary>
    ''' Adds a broken rule to the business object's collection
    ''' </summary>
    ''' <remarks></remarks>
    Protected Shadows Sub AddBrokenRule(ByVal FieldName As String, ByVal ErrorMessage As String)
        MyBase.AddBrokenRule(FieldName, ErrorMessage)
    End Sub

    ''' <summary>
    ''' Adds a broken rules to the business object's collection using the given message key to pull the error message from the localization database
    ''' </summary>
    ''' <remarks></remarks>
    Protected Shadows Sub AddBrokenRuleByKey(ByVal Field As MyTableBOFieldNames, ByVal ErrorMessageKey As String)
        MyBase.AddBrokenRuleByKey(Field, ErrorMessageKey)
    End Sub

    ''' <summary>
    ''' Adds a broken rules to the business object's collection using the given message key to pull the error message from the localization database
    ''' </summary>
    ''' <remarks></remarks>
    Protected Shadows Sub AddBrokenRuleByKey(ByVal FieldName As String, ByVal ErrorMessageKey As String)
        MyBase.AddBrokenRuleByKey(FieldName, ErrorMessageKey)
    End Sub

    ''' <summary>
    ''' Gets a collection of the names for all fields that belong to this business object and map to the database.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides ReadOnly Property AllFieldsList() As List(Of String)
        Get
            Return _AllFieldsList
        End Get
    End Property

    ''' <summary>
    ''' Gets a dictionary of the DbTypes for all fields that belong to this business object and map to the database.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides ReadOnly Property FieldDbTypes() As Dictionary(Of String, DbType)
        Get
            Return _FieldDbTypes
        End Get
    End Property

    ''' <summary>
    ''' Gets a dictionary of all fields within this business object that map to the FieldNames enumeration for this business object.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides ReadOnly Property FieldEnums() As BusinessLayerFieldEnumDictionary
        Get
            Return _FieldEnums
        End Get
    End Property

    ''' <summary>
    ''' Gets a dictionary of all of the lengths for all fields within this business object that map to a field in the database.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides ReadOnly Property FieldLengths() As Dictionary(Of String, Integer)
        Get
            Return _FieldLengths
        End Get
    End Property

    ''' <summary>
    ''' Gets a dictionary of the native DbType (SqlDbType, OracleType, OleDbType, etc.) for all fields within this buisness object that map to a field in the database.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides ReadOnly Property FieldNativeDbTypes() As Dictionary(Of String, Integer)
        Get
            Return _FieldNativeDbTypes
        End Get
    End Property

    ''' <summary>
    ''' Gets a dictionary of the security permission keys for each field in the business object.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides ReadOnly Property FieldPermissionKeys() As Dictionary(Of String, String)
        Get
            Return _FieldPermissionKeys
        End Get
    End Property

#End Region

#Region " Field Properties "

    ''' <summary>
    ''' Primary Key
    ''' </summary>
    ''' <remarks></remarks>
    <Browsable(False), _
     BusinessFieldDisplayInEditor(), _
     Description("Primary Key"), _
     DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
    Public Property [mt_pk]() As System.Int32
        Get
            Return CType(Me.CurrentRow.Item("mt_pk"), System.Int32)
        End Get
        Set(ByVal value As System.Int32)
            Me.CurrentRow.Item("mt_pk") = value
        End Set
    End Property

    ''' <summary>
    ''' First name
    ''' </summary>
    ''' <remarks></remarks>
    <Browsable(False), _
     BusinessFieldDisplayInEditor(), _
     Description("First name"), _
     DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
    Public Property [mt_fname]() As System.String
        Get
            Return CType(Me.CurrentRow.Item("mt_fname"), System.String)
        End Get
        Set(ByVal value As System.String)
            Me.CurrentRow.Item("mt_fname") = value
        End Set
    End Property

    ''' <summary>
    ''' Last Name
    ''' </summary>
    ''' <remarks></remarks>
    <Browsable(False), _
     BusinessFieldDisplayInEditor(), _
     Description("Last Name"), _
     DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
    Public Property [mt_lname]() As System.String
        Get
            Return CType(Me.CurrentRow.Item("mt_lname"), System.String)
        End Get
        Set(ByVal value As System.String)
            Me.CurrentRow.Item("mt_lname") = value
        End Set
    End Property

    ''' <summary>
    ''' Time Stamp
    ''' </summary>
    ''' <remarks></remarks>
    <Browsable(False), _
     BusinessFieldDisplayInEditor(), _
     Description("Time Stamp"), _
     DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
    Public Property [mt_Created]() As System.DateTime
        Get
            Return CType(Me.CurrentRow.Item("mt_Created"), System.DateTime)
        End Get
        Set(ByVal value As System.DateTime)
            Me.CurrentRow.Item("mt_Created") = value
        End Set
    End Property

    ''' <summary>
    ''' Address
    ''' </summary>
    ''' <remarks></remarks>
    <Browsable(False), _
     BusinessFieldDisplayInEditor(), _
     Description("Address"), _
     DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
    Public Property [mt_Address1]() As System.String
        Get
            Return CType(Me.CurrentRow.Item("mt_Address1"), System.String)
        End Get
        Set(ByVal value As System.String)
            Me.CurrentRow.Item("mt_Address1") = value
        End Set
    End Property

    ''' <summary>
    ''' City
    ''' </summary>
    ''' <remarks></remarks>
    <Browsable(False), _
     BusinessFieldDisplayInEditor(), _
     Description("City"), _
     DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
    Public Property [mt_City]() As System.String
        Get
            Return CType(Me.CurrentRow.Item("mt_City"), System.String)
        End Get
        Set(ByVal value As System.String)
            Me.CurrentRow.Item("mt_City") = value
        End Set
    End Property

    ''' <summary>
    ''' Row Version
    ''' </summary>
    ''' <remarks></remarks>
    <Browsable(False), _
     BusinessFieldDisplayInEditor(), _
     Description("Row Version"), _
     DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
    Public Property [mt_Version]() As System.Int32
        Get
            Return CType(Me.CurrentRow.Item("mt_Version"), System.Int32)
        End Get
        Set(ByVal value As System.Int32)
            Me.CurrentRow.Item("mt_Version") = value
        End Set
    End Property

#End Region

#Region " Field Property Events  "

#End Region

#Region " Nested Types & Field Security "

    ''' <summary>
    ''' Contains all of the field names that belong to the business object.
    ''' </summary>
    ''' <remarks></remarks>
    Public Enum MyTableBOFieldNames As Integer
        [mt_pk]
        [mt_fname]
        [mt_lname]
        [mt_Created]
        [mt_Address1]
        [mt_City]
        [mt_Version]
        CUSTOM_FIELD
    End Enum

    ''' <summary>
    ''' Gets the System.Type of the enumeration that contains the field names for the business object.
    ''' </summary>
    ''' <remarks></remarks>
    Public Overrides Function GetFieldEnumType() As System.Type
        Return GetType(MyTableBOFieldNames)
    End Function

    ''' <summary>
    ''' Creates a new CheckFieldSecurityEventArgs object that can be used with this business object type.
    ''' </summary>
    ''' <remarks></remarks>
    Protected Overrides Function CreateNewFieldSecurityEventArgs(ByVal Field As System.Enum, ByVal CustomField As String, ByVal PermissionKey As String, ByVal Perm As PermissionInfo) As CheckFieldSecurityEventArgsBase
        Return New CheckFieldSecurityEventArgs(Of MyTableBOFieldNames)(Field, CustomField, PermissionKey, Perm)
    End Function

    ''' <summary>
    ''' Describes a method that will handle the CheckFieldScurity event.
    ''' </summary>
    ''' <remarks></remarks>
    Public Delegate Sub CheckFieldSecurityEventHandler(ByVal sender As Object, ByVal e As CheckFieldSecurityEventArgs(Of MyTableBOFieldNames))

    ''' <summary>
    ''' Occurs when the business objects needs to check the security on a field.
    ''' </summary>
    ''' <remarks></remarks>
    Public Event CheckFieldSecurity As CheckFieldSecurityEventHandler

    ''' <summary>
    ''' Raises the CheckFieldSecurity event.
    ''' </summary>
    ''' <remarks></remarks>
    Protected Overrides Sub OnCheckFieldSecurity(ByVal e As CheckFieldSecurityEventArgsBase)
        RaiseEvent CheckFieldSecurity(Me, CType(e, CheckFieldSecurityEventArgs(Of MyTableBOFieldNames)))
    End Sub

#End Region

#Region " Item Property Implementation "


    Private Shared _AllFieldsList As List(Of String)
    Private Shared _FieldDbTypes As Dictionary(Of String, DbType)
    Private Shared _FieldEnums As BusinessLayerFieldEnumDictionary
    Private Shared _FieldLengths As Dictionary(Of String, Integer)
    Private Shared _FieldNativeDbTypes As Dictionary(Of String, Integer)
    Private Shared _FieldPermissionKeys As Dictionary(Of String, String)

    ''' <summary>
    ''' Initializes the shared members of the MyTableBO class.
    ''' </summary>
    ''' <remarks></remarks>
    Shared Sub New()
        '-- Create the new shared dictionary and populate it with an 
        '   instance of each property descriptor
        _PropertyDescriptors = New PropertyDescriptorDictionary(12)
        _PropertyDescriptors.Add("mt_pk", New Field_mt_pk_Descriptor())
        _PropertyDescriptors.Add("mt_fname", New Field_mt_fname_Descriptor())
        _PropertyDescriptors.Add("mt_lname", New Field_mt_lname_Descriptor())
        _PropertyDescriptors.Add("mt_Created", New Field_mt_Created_Descriptor())
        _PropertyDescriptors.Add("mt_Address1", New Field_mt_Address1_Descriptor())
        _PropertyDescriptors.Add("mt_City", New Field_mt_City_Descriptor())
        _PropertyDescriptors.Add("mt_Version", New Field_mt_Version_Descriptor())

        _AllFieldsList = New List(Of String)(7)
        _AllFieldsList.Add("mt_pk")
        _AllFieldsList.Add("mt_fname")
        _AllFieldsList.Add("mt_lname")
        _AllFieldsList.Add("mt_Created")
        _AllFieldsList.Add("mt_Address1")
        _AllFieldsList.Add("mt_City")
        _AllFieldsList.Add("mt_Version")

        _FieldDbTypes = New Dictionary(Of String, DbType)(7)
        _FieldDbTypes.Add("mt_pk", DbType.Int32)
        _FieldDbTypes.Add("mt_fname", DbType.AnsiString)
        _FieldDbTypes.Add("mt_lname", DbType.AnsiString)
        _FieldDbTypes.Add("mt_Created", DbType.DateTime)
        _FieldDbTypes.Add("mt_Address1", DbType.AnsiString)
        _FieldDbTypes.Add("mt_City", DbType.AnsiString)
        _FieldDbTypes.Add("mt_Version", DbType.Int32)

        _FieldEnums = New BusinessLayerFieldEnumDictionary(8)
        _FieldEnums.Add("mt_pk", MyTableBOFieldNames.mt_pk)
        _FieldEnums.Add("mt_fname", MyTableBOFieldNames.mt_fname)
        _FieldEnums.Add("mt_lname", MyTableBOFieldNames.mt_lname)
        _FieldEnums.Add("mt_Created", MyTableBOFieldNames.mt_Created)
        _FieldEnums.Add("mt_Address1", MyTableBOFieldNames.mt_Address1)
        _FieldEnums.Add("mt_City", MyTableBOFieldNames.mt_City)
        _FieldEnums.Add("mt_Version", MyTableBOFieldNames.mt_Version)
        _FieldEnums.Add("CUSTOM_FIELD", MyTableBOFieldNames.CUSTOM_FIELD)

        _FieldLengths = New Dictionary(Of String, Integer)(7)
        _FieldLengths.Add("mt_pk", 4)
        _FieldLengths.Add("mt_fname", 20)
        _FieldLengths.Add("mt_lname", 30)
        _FieldLengths.Add("mt_Created", 8)
        _FieldLengths.Add("mt_Address1", 200)
        _FieldLengths.Add("mt_City", 20)
        _FieldLengths.Add("mt_Version", 4)

        _FieldNativeDbTypes = New Dictionary(Of String, Integer)(7)
        _FieldNativeDbTypes.Add("mt_pk", System.Data.SqlDbType.Int)
        _FieldNativeDbTypes.Add("mt_fname", System.Data.SqlDbType.VarChar)
        _FieldNativeDbTypes.Add("mt_lname", System.Data.SqlDbType.VarChar)
        _FieldNativeDbTypes.Add("mt_Created", System.Data.SqlDbType.DateTime)
        _FieldNativeDbTypes.Add("mt_Address1", System.Data.SqlDbType.VarChar)
        _FieldNativeDbTypes.Add("mt_City", System.Data.SqlDbType.VarChar)
        _FieldNativeDbTypes.Add("mt_Version", System.Data.SqlDbType.Int)

        _FieldPermissionKeys = New Dictionary(Of String, String)(7)

    End Sub

    Private Shared _AreCustomDescriptorsEvaluated As Boolean = False
    Protected Overrides ReadOnly Property AreCustomDescriptorsEvaluated() As Boolean
        Get
            Dim llReturn As Boolean = _AreCustomDescriptorsEvaluated
            _AreCustomDescriptorsEvaluated = True
            Return llReturn
        End Get
    End Property

    Private Shared _PropertyDescriptors As PropertyDescriptorDictionary
    Protected Overrides ReadOnly Property PropertyDescriptors() As PropertyDescriptorDictionary
        Get
            Return _PropertyDescriptors
        End Get
    End Property

    ''' <summary>
    ''' A private field used to store the System.Type of this business object for use by the FieldPropertyDescriptor classes.
    ''' </summary>
    ''' <remarks></remarks>

    Private Shared _ComponentType As System.Type = GetType(MyTableBO)

    ''' <summary>
    ''' A PropertyDescriptor class used to Get and Set the value of the mt_pk property.
    ''' </summary>
    ''' <remarks></remarks>
    Private Class Field_mt_pk_Descriptor
        Inherits MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        Public Sub New()
            MyBase.New("mt_pk")
        End Sub
        Private _PropertyType As System.Type = GetType(System.Int32)
        Public Overrides Function GetValue(ByVal component As Object) As Object
            Return CType(component, MyTableBO).mt_pk
        End Function
        Public Overrides Sub SetValue(ByVal component As Object, ByVal Value As Object)
            CType(component, MyTableBO).mt_pk = CType(Value, System.Int32)
        End Sub
        Public Overrides ReadOnly Property PropertyType() As System.Type
            Get
                Return Me._PropertyType
            End Get
        End Property
        Public Overrides ReadOnly Property ComponentType() As System.Type
            Get
                Return _ComponentType
            End Get
        End Property
    End Class

    ''' <summary>
    ''' A PropertyDescriptor class used to Get and Set the value of the mt_fname property.
    ''' </summary>
    ''' <remarks></remarks>
    Private Class Field_mt_fname_Descriptor
        Inherits MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        Public Sub New()
            MyBase.New("mt_fname")
        End Sub
        Private _PropertyType As System.Type = GetType(System.String)
        Public Overrides Function GetValue(ByVal component As Object) As Object
            Return CType(component, MyTableBO).mt_fname
        End Function
        Public Overrides Sub SetValue(ByVal component As Object, ByVal Value As Object)
            CType(component, MyTableBO).mt_fname = CType(Value, System.String)
        End Sub
        Public Overrides ReadOnly Property PropertyType() As System.Type
            Get
                Return Me._PropertyType
            End Get
        End Property
        Public Overrides ReadOnly Property ComponentType() As System.Type
            Get
                Return _ComponentType
            End Get
        End Property
    End Class

    ''' <summary>
    ''' A PropertyDescriptor class used to Get and Set the value of the mt_lname property.
    ''' </summary>
    ''' <remarks></remarks>
    Private Class Field_mt_lname_Descriptor
        Inherits MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        Public Sub New()
            MyBase.New("mt_lname")
        End Sub
        Private _PropertyType As System.Type = GetType(System.String)
        Public Overrides Function GetValue(ByVal component As Object) As Object
            Return CType(component, MyTableBO).mt_lname
        End Function
        Public Overrides Sub SetValue(ByVal component As Object, ByVal Value As Object)
            CType(component, MyTableBO).mt_lname = CType(Value, System.String)
        End Sub
        Public Overrides ReadOnly Property PropertyType() As System.Type
            Get
                Return Me._PropertyType
            End Get
        End Property
        Public Overrides ReadOnly Property ComponentType() As System.Type
            Get
                Return _ComponentType
            End Get
        End Property
    End Class

    ''' <summary>
    ''' A PropertyDescriptor class used to Get and Set the value of the mt_Created property.
    ''' </summary>
    ''' <remarks></remarks>
    Private Class Field_mt_Created_Descriptor
        Inherits MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        Public Sub New()
            MyBase.New("mt_Created")
        End Sub
        Private _PropertyType As System.Type = GetType(System.DateTime)
        Public Overrides Function GetValue(ByVal component As Object) As Object
            Return CType(component, MyTableBO).mt_Created
        End Function
        Public Overrides Sub SetValue(ByVal component As Object, ByVal Value As Object)
            CType(component, MyTableBO).mt_Created = CType(Value, System.DateTime)
        End Sub
        Public Overrides ReadOnly Property PropertyType() As System.Type
            Get
                Return Me._PropertyType
            End Get
        End Property
        Public Overrides ReadOnly Property ComponentType() As System.Type
            Get
                Return _ComponentType
            End Get
        End Property
    End Class

    ''' <summary>
    ''' A PropertyDescriptor class used to Get and Set the value of the mt_Address1 property.
    ''' </summary>
    ''' <remarks></remarks>
    Private Class Field_mt_Address1_Descriptor
        Inherits MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        Public Sub New()
            MyBase.New("mt_Address1")
        End Sub
        Private _PropertyType As System.Type = GetType(System.String)
        Public Overrides Function GetValue(ByVal component As Object) As Object
            Return CType(component, MyTableBO).mt_Address1
        End Function
        Public Overrides Sub SetValue(ByVal component As Object, ByVal Value As Object)
            CType(component, MyTableBO).mt_Address1 = CType(Value, System.String)
        End Sub
        Public Overrides ReadOnly Property PropertyType() As System.Type
            Get
                Return Me._PropertyType
            End Get
        End Property
        Public Overrides ReadOnly Property ComponentType() As System.Type
            Get
                Return _ComponentType
            End Get
        End Property
    End Class

    ''' <summary>
    ''' A PropertyDescriptor class used to Get and Set the value of the mt_City property.
    ''' </summary>
    ''' <remarks></remarks>
    Private Class Field_mt_City_Descriptor
        Inherits MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        Public Sub New()
            MyBase.New("mt_City")
        End Sub
        Private _PropertyType As System.Type = GetType(System.String)
        Public Overrides Function GetValue(ByVal component As Object) As Object
            Return CType(component, MyTableBO).mt_City
        End Function
        Public Overrides Sub SetValue(ByVal component As Object, ByVal Value As Object)
            CType(component, MyTableBO).mt_City = CType(Value, System.String)
        End Sub
        Public Overrides ReadOnly Property PropertyType() As System.Type
            Get
                Return Me._PropertyType
            End Get
        End Property
        Public Overrides ReadOnly Property ComponentType() As System.Type
            Get
                Return _ComponentType
            End Get
        End Property
    End Class

    ''' <summary>
    ''' A PropertyDescriptor class used to Get and Set the value of the mt_Version property.
    ''' </summary>
    ''' <remarks></remarks>
    Private Class Field_mt_Version_Descriptor
        Inherits MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        Public Sub New()
            MyBase.New("mt_Version")
        End Sub
        Private _PropertyType As System.Type = GetType(System.Int32)
        Public Overrides Function GetValue(ByVal component As Object) As Object
            Return CType(component, MyTableBO).mt_Version
        End Function
        Public Overrides Sub SetValue(ByVal component As Object, ByVal Value As Object)
            CType(component, MyTableBO).mt_Version = CType(Value, System.Int32)
        End Sub
        Public Overrides ReadOnly Property PropertyType() As System.Type
            Get
                Return Me._PropertyType
            End Get
        End Property
        Public Overrides ReadOnly Property ComponentType() As System.Type
            Get
                Return _ComponentType
            End Get
        End Property
    End Class

#End Region

End Class

