Imports System.Data
Imports System.Data.SqlClient
Imports System.Runtime.Serialization

<Serializable()> _
Public Class MyTableBO
    Inherits MicroFour.StrataFrame.Business.BusinessLayer

#Region " Constructors "

	''' <summary>
    ''' Initializes a new instance of the MyTableBO class.
    ''' </summary>
    ''' <remarks></remarks>
    <System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Public Sub New()
        MyBase.New()
        'This call is required by the Component Designer.
        Me.InitializeComponent()
        '-- Add the necessary handlers
        Me.AddHandlers()
    End Sub

    ''' <summary>
    ''' Initializes a new instance of the MyTableBO class.
    ''' </summary>
    ''' <param name="Container">The IContainer to which this object will be added.</param>
    ''' <remarks></remarks>
    <System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Public Sub New(ByVal Container As System.ComponentModel.IContainer)
        MyBase.New()
        'This call adds the component to the given container.
        Container.Add(Me)
        'This call is required by the Component Designer.
        Me.InitializeComponent()
        '-- Add the necessary handlers
        Me.AddHandlers()
    End Sub

    ''' <summary>
    ''' Initializes a new instance of the MyTableBO class.
    ''' </summary>
    ''' <param name="info">The SerializationInfo for the object.</param>
    ''' <param name="context">The StreamingContext for the source stream.</param>
    ''' <remarks></remarks>
    Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
        MyBase.New(info, context)
        'This call is required by the Component Designer.
        Me.InitializeComponent()
        '-- Add the necessary handlers
        Me.AddHandlers()
    End Sub
    
    ''' <summary>
    ''' Adds the necessary handlers for the MyTableBO class.
    ''' </summary>
    ''' <remarks></remarks>
    Private Sub AddHandlers()
		AddHandler Me.CheckRulesOnCurrentRow, AddressOf MyTableBO_CheckRulesOnCurrentRow
		AddHandler Me.SetDefaultValues, AddressOf MyTableBO_SetDefaultValues
    End Sub
    
#End Region 

#Region " Data Retrieval Methods "

    Public Sub FillAll()
        Me.FillDataTable("SELECT * FROM MyTable")
    End Sub

#End Region

#Region " Event Handlers "

    ''' <summary>
    ''' Checks the business rules on the current row
    ''' </summary>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub MyTableBO_CheckRulesOnCurrentRow(ByVal e As MicroFour.StrataFrame.Business.CheckRulesEventArgs)

    End Sub

    ''' <summary>
    ''' Sets the default values for a new row
    ''' </summary>
    ''' <remarks></remarks>
    Private Sub MyTableBO_SetDefaultValues()

    End Sub

#End Region

End Class
