📄 dataset1.vb
字号:
'------------------------------------------------------------------------------
' <autogenerated>
' This code was generated by a tool.
' Runtime Version: 1.1.4322.573
'
' 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"), _
System.Diagnostics.DebuggerStepThrough(), _
System.ComponentModel.ToolboxItem(true)> _
Public Class DataSet1
Inherits DataSet
Private tableforum As forumDataTable
Public Sub New()
MyBase.New
Me.InitClass
Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
AddHandler Me.Tables.CollectionChanged, schemaChangedHandler
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
End Sub
Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
MyBase.New
Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(System.String)),String)
If (Not (strSchema) Is Nothing) Then
Dim ds As DataSet = New DataSet
ds.ReadXmlSchema(New XmlTextReader(New System.IO.StringReader(strSchema)))
If (Not (ds.Tables("forum")) Is Nothing) Then
Me.Tables.Add(New forumDataTable(ds.Tables("forum")))
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.InitClass
End If
Me.GetSerializationData(info, context)
Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
AddHandler Me.Tables.CollectionChanged, schemaChangedHandler
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
End Sub
<System.ComponentModel.Browsable(false), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property forum As forumDataTable
Get
Return Me.tableforum
End Get
End Property
Public Overrides Function Clone() As DataSet
Dim cln As DataSet1 = CType(MyBase.Clone,DataSet1)
cln.InitVars
Return cln
End Function
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.Reset
Dim ds As DataSet = New DataSet
ds.ReadXml(reader)
If (Not (ds.Tables("forum")) Is Nothing) Then
Me.Tables.Add(New forumDataTable(ds.Tables("forum")))
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
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
Friend Sub InitVars()
Me.tableforum = CType(Me.Tables("forum"),forumDataTable)
If (Not (Me.tableforum) Is Nothing) Then
Me.tableforum.InitVars
End If
End Sub
Private Sub InitClass()
Me.DataSetName = "DataSet1"
Me.Prefix = ""
Me.Namespace = "http://www.tempuri.org/DataSet1.xsd"
Me.Locale = New System.Globalization.CultureInfo("zh-CN")
Me.CaseSensitive = false
Me.EnforceConstraints = true
Me.tableforum = New forumDataTable
Me.Tables.Add(Me.tableforum)
End Sub
Private Function ShouldSerializeforum() As Boolean
Return false
End Function
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
Public Delegate Sub forumRowChangeEventHandler(ByVal sender As Object, ByVal e As forumRowChangeEvent)
<System.Diagnostics.DebuggerStepThrough()> _
Public Class forumDataTable
Inherits DataTable
Implements System.Collections.IEnumerable
Private columnforum_subject_id As DataColumn
Private columnforum_subject_name As DataColumn
Friend Sub New()
MyBase.New("forum")
Me.InitClass
End Sub
Friend Sub New(ByVal table As DataTable)
MyBase.New(table.TableName)
If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
Me.CaseSensitive = table.CaseSensitive
End If
If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
Me.Locale = table.Locale
End If
If (table.Namespace <> table.DataSet.Namespace) Then
Me.Namespace = table.Namespace
End If
Me.Prefix = table.Prefix
Me.MinimumCapacity = table.MinimumCapacity
Me.DisplayExpression = table.DisplayExpression
End Sub
<System.ComponentModel.Browsable(false)> _
Public ReadOnly Property Count As Integer
Get
Return Me.Rows.Count
End Get
End Property
Friend ReadOnly Property forum_subject_idColumn As DataColumn
Get
Return Me.columnforum_subject_id
End Get
End Property
Friend ReadOnly Property forum_subject_nameColumn As DataColumn
Get
Return Me.columnforum_subject_name
End Get
End Property
Public Default ReadOnly Property Item(ByVal index As Integer) As forumRow
Get
Return CType(Me.Rows(index),forumRow)
End Get
End Property
Public Event forumRowChanged As forumRowChangeEventHandler
Public Event forumRowChanging As forumRowChangeEventHandler
Public Event forumRowDeleted As forumRowChangeEventHandler
Public Event forumRowDeleting As forumRowChangeEventHandler
Public Overloads Sub AddforumRow(ByVal row As forumRow)
Me.Rows.Add(row)
End Sub
Public Overloads Function AddforumRow(ByVal forum_subject_id As Short, ByVal forum_subject_name As String) As forumRow
Dim rowforumRow As forumRow = CType(Me.NewRow,forumRow)
rowforumRow.ItemArray = New Object() {forum_subject_id, forum_subject_name}
Me.Rows.Add(rowforumRow)
Return rowforumRow
End Function
Public Function FindByforum_subject_id(ByVal forum_subject_id As Short) As forumRow
Return CType(Me.Rows.Find(New Object() {forum_subject_id}),forumRow)
End Function
Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
Return Me.Rows.GetEnumerator
End Function
Public Overrides Function Clone() As DataTable
Dim cln As forumDataTable = CType(MyBase.Clone,forumDataTable)
cln.InitVars
Return cln
End Function
Protected Overrides Function CreateInstance() As DataTable
Return New forumDataTable
End Function
Friend Sub InitVars()
Me.columnforum_subject_id = Me.Columns("forum_subject_id")
Me.columnforum_subject_name = Me.Columns("forum_subject_name")
End Sub
Private Sub InitClass()
Me.columnforum_subject_id = New DataColumn("forum_subject_id", GetType(System.Int16), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnforum_subject_id)
Me.columnforum_subject_name = New DataColumn("forum_subject_name", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnforum_subject_name)
Me.Constraints.Add(New UniqueConstraint("Constraint1", New DataColumn() {Me.columnforum_subject_id}, true))
Me.columnforum_subject_id.AllowDBNull = false
Me.columnforum_subject_id.Unique = true
End Sub
Public Function NewforumRow() As forumRow
Return CType(Me.NewRow,forumRow)
End Function
Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
Return New forumRow(builder)
End Function
Protected Overrides Function GetRowType() As System.Type
Return GetType(forumRow)
End Function
Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.forumRowChangedEvent) Is Nothing) Then
RaiseEvent forumRowChanged(Me, New forumRowChangeEvent(CType(e.Row,forumRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
If (Not (Me.forumRowChangingEvent) Is Nothing) Then
RaiseEvent forumRowChanging(Me, New forumRowChangeEvent(CType(e.Row,forumRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleted(e)
If (Not (Me.forumRowDeletedEvent) Is Nothing) Then
RaiseEvent forumRowDeleted(Me, New forumRowChangeEvent(CType(e.Row,forumRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleting(e)
If (Not (Me.forumRowDeletingEvent) Is Nothing) Then
RaiseEvent forumRowDeleting(Me, New forumRowChangeEvent(CType(e.Row,forumRow), e.Action))
End If
End Sub
Public Sub RemoveforumRow(ByVal row As forumRow)
Me.Rows.Remove(row)
End Sub
End Class
<System.Diagnostics.DebuggerStepThrough()> _
Public Class forumRow
Inherits DataRow
Private tableforum As forumDataTable
Friend Sub New(ByVal rb As DataRowBuilder)
MyBase.New(rb)
Me.tableforum = CType(Me.Table,forumDataTable)
End Sub
Public Property forum_subject_id As Short
Get
Return CType(Me(Me.tableforum.forum_subject_idColumn),Short)
End Get
Set
Me(Me.tableforum.forum_subject_idColumn) = value
End Set
End Property
Public Property forum_subject_name As String
Get
Try
Return CType(Me(Me.tableforum.forum_subject_nameColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableforum.forum_subject_nameColumn) = value
End Set
End Property
Public Function Isforum_subject_nameNull() As Boolean
Return Me.IsNull(Me.tableforum.forum_subject_nameColumn)
End Function
Public Sub Setforum_subject_nameNull()
Me(Me.tableforum.forum_subject_nameColumn) = System.Convert.DBNull
End Sub
End Class
<System.Diagnostics.DebuggerStepThrough()> _
Public Class forumRowChangeEvent
Inherits EventArgs
Private eventRow As forumRow
Private eventAction As DataRowAction
Public Sub New(ByVal row As forumRow, ByVal action As DataRowAction)
MyBase.New
Me.eventRow = row
Me.eventAction = action
End Sub
Public ReadOnly Property Row As forumRow
Get
Return Me.eventRow
End Get
End Property
Public ReadOnly Property Action As DataRowAction
Get
Return Me.eventAction
End Get
End Property
End Class
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -