Imports MicroFour.StrataFrame.DBEngine.SQL

Public Class Form1

#Region " Declare Privates "

    Private WithEvents _DataDeploy As MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator

#End Region


    Public Sub New()

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

    End Sub

    Private Sub ListView1_RowPopulating(ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.RowPopulatingEventArgs) Handles ListView1.RowPopulating
        With CType(e.BusinessObject, CustomersBO)

            e.UseGroup = True

            e.GroupHeaderText = .cust_PhoneDayType.ToString()

            Select Case .cust_PhoneDayType
                Case PhoneType.Home
                    e.ImageIndex = 0

                Case PhoneType.Mobile
                    e.ImageIndex = 1

                Case PhoneType.Pager
                    e.ImageIndex = 2
                    e.RowForeColor = Drawing.Color.Red

                Case PhoneType.Work
                    e.ImageIndex = 3

            End Select

            e.Values(3).DisplayValue = .cust_pk.ToString()
        End With

    End Sub

    Private Sub Textbox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Textbox4.TextChanged
        Dim loItem As New ListViewItem
        loItem = Me.ListView1.FindItemWithText(Me.Textbox4.Text)

        If loItem IsNot Nothing Then
            Me.ListView1.EnsureVisible(Me.ListView1.Items.IndexOf(loItem))
        End If
    End Sub

    Private Sub CustomersBO1_ParentFormLoading() Handles CustomersBO1.ParentFormLoading
        Me.CustomersBO1.FillTop100()
    End Sub
End Class