📄 dataset1.vb
字号:
'------------------------------------------------------------------------------
' <autogenerated>
' This code was generated by a tool.
' Runtime Version: 1.0.2914.16
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </autogenerated>
'------------------------------------------------------------------------------
Option Strict Off
Option Explicit On
Imports System
Imports System.Data
Imports System.Runtime.Serialization
Imports System.Xml
<Serializable(), _
System.ComponentModel.DesignerCategoryAttribute("code")> _
Public Class DataSet1
Inherits System.Data.DataSet
Private tableCustomers As CustomersDataTable
Public Sub New()
MyBase.New
Me.InitClass
End Sub
Private Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
MyBase.New
Me.InitClass
Me.GetSerializationData(info, context)
End Sub
<System.ComponentModel.Browsable(false), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property Customers As CustomersDataTable
Get
Return Me.tableCustomers
End Get
End Property
Protected Overrides Function ShouldSerializeTables() As Boolean
Return false
End Function
Protected Overrides Function ShouldSerializeRelations() As Boolean
Return false
End Function
Protected Overrides Sub ReadXmlSerializable(ByVal reader As XmlReader)
Me.ReadXml(reader, XmlReadMode.IgnoreSchema)
End Sub
Protected Overrides Function GetSchemaSerializable() As System.Xml.Schema.XmlSchema
Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream
Me.WriteXmlSchema(New XmlTextWriter(stream, Nothing))
stream.Position = 0
Return System.Xml.Schema.XmlSchema.Read(New XmlTextReader(stream), Nothing)
End Function
Private Sub InitClass()
Me.DataSetName = "DataSet1"
Me.Namespace = "http://www.tempuri.org/DataSet1.xsd"
Me.tableCustomers = New CustomersDataTable
Me.Tables.Add(Me.tableCustomers)
End Sub
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
Return CType(Me.Rows.Find(New Object() {CustomerID}),CustomersRow)
End Function
Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
Return Me.Rows.GetEnumerator
End Function
Private Sub InitClass()
Me.columnCustomerID = New DataColumn("CustomerID", GetType(System.String), "", System.Data.MappingType.Element)
Me.columnCustomerID.AllowDBNull = false
Me.columnCustomerID.Unique = true
Me.Columns.Add(Me.columnCustomerID)
Me.columnCompanyName = New DataColumn("CompanyName", GetType(System.String), "", System.Data.MappingType.Element)
Me.columnCompanyName.AllowDBNull = false
Me.Columns.Add(Me.columnCompanyName)
Me.columnContactName = New DataColumn("ContactName", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnContactName)
Me.columnContactTitle = New DataColumn("ContactTitle", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnContactTitle)
Me.columnAddress = New DataColumn("Address", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnAddress)
Me.columnCity = New DataColumn("City", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnCity)
Me.column_Region = New DataColumn("Region", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.column_Region)
Me.columnPostalCode = New DataColumn("PostalCode", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnPostalCode)
Me.columnCountry = New DataColumn("Country", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnCountry)
Me.columnPhone = New DataColumn("Phone", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnPhone)
Me.columnFax = New DataColumn("Fax", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnFax)
Me.PrimaryKey = New DataColumn() {Me.columnCustomerID}
End Sub
Public Function NewCustomersRow() As CustomersRow
Return CType(Me.NewRow,CustomersRow)
End Function
Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
'We need to ensure that all Rows in the tabled are typed rows.
'Table calls newRow whenever it needs to create a row.
'So the following conditions are covered by Row newRow(Record record)
'* Cursor calls table.addRecord(record)
'* table.addRow(object[] values) calls newRow(record)
Return New CustomersRow(builder)
End Function
Protected Overrides Function GetRowType() As System.Type
Return GetType(CustomersRow)
End Function
Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.CustomersRowChangedEvent) Is Nothing) Then
RaiseEvent CustomersRowChanged(Me, New CustomersRowChangeEvent(CType(e.Row,CustomersRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -