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

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

#Region " Constructors "

    ''' <summary>
    ''' Initializes a new instance of the BusinessObject1 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 BusinessObject1 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 BusinessObject1 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 BusinessObject1 class.
    ''' </summary>
    ''' <remarks></remarks>
    Private Sub AddHandlers()
        AddHandler Me.CheckRulesOnCurrentRow, AddressOf BusinessObject1_CheckRulesOnCurrentRow
        AddHandler Me.SetDefaultValues, AddressOf BusinessObject1_SetDefaultValues
    End Sub

#End Region

#Region " Data Retieval Methods "
    Public Sub FillTOP100()
        Using cmd As New SqlCommand()
            cmd.CommandText = String.Format("Select TOP 100 * From {0}", Me.TableName)
            Me.FillDataTable(cmd)
        End Using
    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 BusinessObject1_CheckRulesOnCurrentRow(ByVal e As MicroFour.StrataFrame.Business.CheckRulesEventArgs)

    End Sub

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

    End Sub

#End Region

End Class
