Private Function ShouldSerializeCustomers() As Boolean
Return false
End Function
Public Delegate Sub CustomersRowChangeEventHandler(ByVal sender As Object, ByVal e As CustomersRowChangeEvent)
Public Class CustomersDataTable
Inherits DataTable
Implements System.Collections.IEnumerable
Private columnCustomerID As DataColumn
Private columnCompanyName As DataColumn
Private columnContactName As DataColumn
Private columnContactTitle As DataColumn
Private columnAddress As DataColumn
Private columnCity As DataColumn
Private column_Region As DataColumn
Private columnPostalCode As DataColumn
Private columnCountry As DataColumn
Private columnPhone As DataColumn
Private columnFax As DataColumn
Friend Sub New()
MyBase.New("Customers")
Me.InitClass
End Sub
<System.ComponentModel.Browsable(false)> _
Public ReadOnly Property Count As Integer
Get
Return Me.Rows.Count
End Get
End Property
Friend ReadOnly Property CustomerIDColumn As DataColumn
Get
Return Me.columnCustomerID
End Get
End Property
Friend ReadOnly Property CompanyNameColumn As DataColumn
Get
Return Me.columnCompanyName
End Get
End Property
Friend ReadOnly Property ContactNameColumn As DataColumn
Get
Return Me.columnContactName
End Get
End Property
Friend ReadOnly Property ContactTitleColumn As DataColumn
Get
Return Me.columnContactTitle
End Get
End Property
Friend ReadOnly Property AddressColumn As DataColumn
Get
Return Me.columnAddress
End Get
End Property
Friend ReadOnly Property CityColumn As DataColumn
Get
Return Me.columnCity
End Get
End Property
Friend ReadOnly Property _RegionColumn As DataColumn
Get
Return Me.column_Region
End Get
End Property
Friend ReadOnly Property PostalCodeColumn As DataColumn
Get
Return Me.columnPostalCode
End Get
End Property
Friend ReadOnly Property CountryColumn As DataColumn
Get
Return Me.columnCountry
End Get
End Property
Friend ReadOnly Property PhoneColumn As DataColumn
Get
Return Me.columnPhone
End Get
End Property
Friend ReadOnly Property FaxColumn As DataColumn
Get
Return Me.columnFax
End Get
End Property
Public Default ReadOnly Property Item(ByVal index As Integer) As CustomersRow
Get
Return CType(Me.Rows(index),CustomersRow)
End Get
End Property
Public Event CustomersRowChanged As CustomersRowChangeEventHandler
Public Event CustomersRowChanging As CustomersRowChangeEventHandler
Public Event CustomersRowDeleted As CustomersRowChangeEventHandler
Public Event CustomersRowDeleting As CustomersRowChangeEventHandler
Public Overloads Sub AddCustomersRow(ByVal row As CustomersRow)
Me.Rows.Add(row)
End Sub
Public Overloads Function AddCustomersRow(ByVal CustomerID As String, ByVal CompanyName As String, ByVal ContactName As String, ByVal ContactTitle As String, ByVal Address As String, ByVal City As String, ByVal _Region As String, ByVal PostalCode As String, ByVal Country As String, ByVal Phone As String, ByVal Fax As String) As CustomersRow
Dim rowCustomersRow As CustomersRow = CType(Me.NewRow,CustomersRow)
rowCustomersRow.ItemArray = New Object() {CustomerID, CompanyName, ContactName, ContactTitle, Address, City, _Region, PostalCode, Country, Phone, Fax}
Me.Rows.Add(rowCustomersRow)
Return rowCustomersRow
End Function
Public Function FindByCustomerID(ByVal CustomerID As String) As CustomersRow