northwinddataset.designer.vb
来自「wrox出版社的另一套经典的VB2005数据库编程学习书籍,收集了书中源码,郑重」· VB 代码 · 共 1,246 行 · 第 1/5 页
VB
1,246 行
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:2.0.50727.42
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict Off
Option Explicit On
Imports System
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
Serializable(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.ComponentModel.ToolboxItem(true), _
System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
System.Xml.Serialization.XmlRootAttribute("NorthwindDataSet"), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _
Partial Public Class NorthwindDataSet
Inherits System.Data.DataSet
Private tableNWEmployees As NWEmployeesDataTable
Private tableNWOrders1997 As NWOrders1997DataTable
Private _schemaSerializationMode As System.Data.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub New()
MyBase.New
Me.BeginInit
Me.InitClass
Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
Me.EndInit
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Sub New(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext)
MyBase.New(info, context, false)
If (Me.IsBinarySerialized(info, context) = true) Then
Me.InitVars(false)
Dim schemaChangedHandler1 As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
Return
End If
Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
If (Me.DetermineSchemaSerializationMode(info, context) = System.Data.SchemaSerializationMode.IncludeSchema) Then
Dim ds As System.Data.DataSet = New System.Data.DataSet
ds.ReadXmlSchema(New System.Xml.XmlTextReader(New System.IO.StringReader(strSchema)))
If (Not (ds.Tables("NWEmployees")) Is Nothing) Then
MyBase.Tables.Add(New NWEmployeesDataTable(ds.Tables("NWEmployees")))
End If
If (Not (ds.Tables("NWOrders1997")) Is Nothing) Then
MyBase.Tables.Add(New NWOrders1997DataTable(ds.Tables("NWOrders1997")))
End If
Me.DataSetName = ds.DataSetName
Me.Prefix = ds.Prefix
Me.Namespace = ds.Namespace
Me.Locale = ds.Locale
Me.CaseSensitive = ds.CaseSensitive
Me.EnforceConstraints = ds.EnforceConstraints
Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
Me.InitVars
Else
Me.ReadXmlSchema(New System.Xml.XmlTextReader(New System.IO.StringReader(strSchema)))
End If
Me.GetSerializationData(info, context)
Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Browsable(false), _
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property NWEmployees() As NWEmployeesDataTable
Get
Return Me.tableNWEmployees
End Get
End Property
<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Browsable(false), _
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property NWOrders1997() As NWOrders1997DataTable
Get
Return Me.tableNWOrders1997
End Get
End Property
<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.BrowsableAttribute(true), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)> _
Public Overrides Property SchemaSerializationMode() As System.Data.SchemaSerializationMode
Get
Return Me._schemaSerializationMode
End Get
Set
Me._schemaSerializationMode = value
End Set
End Property
<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
Public Shadows ReadOnly Property Tables() As System.Data.DataTableCollection
Get
Return MyBase.Tables
End Get
End Property
<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
Public Shadows ReadOnly Property Relations() As System.Data.DataRelationCollection
Get
Return MyBase.Relations
End Get
End Property
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Sub InitializeDerivedDataSet()
Me.BeginInit
Me.InitClass
Me.EndInit
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Overrides Function Clone() As System.Data.DataSet
Dim cln As NorthwindDataSet = CType(MyBase.Clone,NorthwindDataSet)
cln.InitVars
cln.SchemaSerializationMode = Me.SchemaSerializationMode
Return cln
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Function ShouldSerializeTables() As Boolean
Return false
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Function ShouldSerializeRelations() As Boolean
Return false
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Sub ReadXmlSerializable(ByVal reader As System.Xml.XmlReader)
If (Me.DetermineSchemaSerializationMode(reader) = System.Data.SchemaSerializationMode.IncludeSchema) Then
Me.Reset
Dim ds As System.Data.DataSet = New System.Data.DataSet
ds.ReadXml(reader)
If (Not (ds.Tables("NWEmployees")) Is Nothing) Then
MyBase.Tables.Add(New NWEmployeesDataTable(ds.Tables("NWEmployees")))
End If
If (Not (ds.Tables("NWOrders1997")) Is Nothing) Then
MyBase.Tables.Add(New NWOrders1997DataTable(ds.Tables("NWOrders1997")))
End If
Me.DataSetName = ds.DataSetName
Me.Prefix = ds.Prefix
Me.Namespace = ds.Namespace
Me.Locale = ds.Locale
Me.CaseSensitive = ds.CaseSensitive
Me.EnforceConstraints = ds.EnforceConstraints
Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
Me.InitVars
Else
Me.ReadXml(reader)
Me.InitVars
End If
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Function GetSchemaSerializable() As System.Xml.Schema.XmlSchema
Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream
Me.WriteXmlSchema(New System.Xml.XmlTextWriter(stream, Nothing))
stream.Position = 0
Return System.Xml.Schema.XmlSchema.Read(New System.Xml.XmlTextReader(stream), Nothing)
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Friend Overloads Sub InitVars()
Me.InitVars(true)
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Friend Overloads Sub InitVars(ByVal initTable As Boolean)
Me.tableNWEmployees = CType(MyBase.Tables("NWEmployees"),NWEmployeesDataTable)
If (initTable = true) Then
If (Not (Me.tableNWEmployees) Is Nothing) Then
Me.tableNWEmployees.InitVars
End If
End If
Me.tableNWOrders1997 = CType(MyBase.Tables("NWOrders1997"),NWOrders1997DataTable)
If (initTable = true) Then
If (Not (Me.tableNWOrders1997) Is Nothing) Then
Me.tableNWOrders1997.InitVars
End If
End If
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub InitClass()
Me.DataSetName = "NorthwindDataSet"
Me.Prefix = ""
Me.Namespace = "http://tempuri.org/NorthwindDataSet.xsd"
Me.EnforceConstraints = true
Me.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
Me.tableNWEmployees = New NWEmployeesDataTable
MyBase.Tables.Add(Me.tableNWEmployees)
Me.tableNWOrders1997 = New NWOrders1997DataTable
MyBase.Tables.Add(Me.tableNWOrders1997)
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Function ShouldSerializeNWEmployees() As Boolean
Return false
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Function ShouldSerializeNWOrders1997() As Boolean
Return false
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub SchemaChanged(ByVal sender As Object, ByVal e As System.ComponentModel.CollectionChangeEventArgs)
If (e.Action = System.ComponentModel.CollectionChangeAction.Remove) Then
Me.InitVars
End If
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Shared Function GetTypedDataSetSchema(ByVal xs As System.Xml.Schema.XmlSchemaSet) As System.Xml.Schema.XmlSchemaComplexType
Dim ds As NorthwindDataSet = New NorthwindDataSet
Dim type As System.Xml.Schema.XmlSchemaComplexType = New System.Xml.Schema.XmlSchemaComplexType
Dim sequence As System.Xml.Schema.XmlSchemaSequence = New System.Xml.Schema.XmlSchemaSequence
xs.Add(ds.GetSchemaSerializable)
Dim any As System.Xml.Schema.XmlSchemaAny = New System.Xml.Schema.XmlSchemaAny
any.Namespace = ds.Namespace
sequence.Items.Add(any)
type.Particle = sequence
Return type
End Function
Public Delegate Sub NWEmployeesRowChangeEventHandler(ByVal sender As Object, ByVal e As NWEmployeesRowChangeEvent)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?