📄 newempds.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 newEmpDS
Inherits DataSet
Private tabletblEmployee As tblEmployeeDataTable
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("tblEmployee")) Is Nothing) Then
Me.Tables.Add(New tblEmployeeDataTable(ds.Tables("tblEmployee")))
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 tblEmployee As tblEmployeeDataTable
Get
Return Me.tabletblEmployee
End Get
End Property
Public Overrides Function Clone() As DataSet
Dim cln As newEmpDS = CType(MyBase.Clone,newEmpDS)
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("tblEmployee")) Is Nothing) Then
Me.Tables.Add(New tblEmployeeDataTable(ds.Tables("tblEmployee")))
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.tabletblEmployee = CType(Me.Tables("tblEmployee"),tblEmployeeDataTable)
If (Not (Me.tabletblEmployee) Is Nothing) Then
Me.tabletblEmployee.InitVars
End If
End Sub
Private Sub InitClass()
Me.DataSetName = "newEmpDS"
Me.Prefix = ""
Me.Namespace = "http://www.tempuri.org/newEmpDS.xsd"
Me.Locale = New System.Globalization.CultureInfo("en-US")
Me.CaseSensitive = false
Me.EnforceConstraints = true
Me.tabletblEmployee = New tblEmployeeDataTable
Me.Tables.Add(Me.tabletblEmployee)
End Sub
Private Function ShouldSerializetblEmployee() 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 tblEmployeeRowChangeEventHandler(ByVal sender As Object, ByVal e As tblEmployeeRowChangeEvent)
<System.Diagnostics.DebuggerStepThrough()> _
Public Class tblEmployeeDataTable
Inherits DataTable
Implements System.Collections.IEnumerable
Private columnemp_addr As DataColumn
Private columnemp_age As DataColumn
Private columnemp_dob As DataColumn
Private columnemp_fname As DataColumn
Private columnemp_idno As DataColumn
Private columnemp_lname As DataColumn
Private columnemp_mname As DataColumn
Private columnemp_pass As DataColumn
Private columnemp_pos As DataColumn
Private columnemp_stat As DataColumn
Friend Sub New()
MyBase.New("tblEmployee")
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 emp_addrColumn As DataColumn
Get
Return Me.columnemp_addr
End Get
End Property
Friend ReadOnly Property emp_ageColumn As DataColumn
Get
Return Me.columnemp_age
End Get
End Property
Friend ReadOnly Property emp_dobColumn As DataColumn
Get
Return Me.columnemp_dob
End Get
End Property
Friend ReadOnly Property emp_fnameColumn As DataColumn
Get
Return Me.columnemp_fname
End Get
End Property
Friend ReadOnly Property emp_idnoColumn As DataColumn
Get
Return Me.columnemp_idno
End Get
End Property
Friend ReadOnly Property emp_lnameColumn As DataColumn
Get
Return Me.columnemp_lname
End Get
End Property
Friend ReadOnly Property emp_mnameColumn As DataColumn
Get
Return Me.columnemp_mname
End Get
End Property
Friend ReadOnly Property emp_passColumn As DataColumn
Get
Return Me.columnemp_pass
End Get
End Property
Friend ReadOnly Property emp_posColumn As DataColumn
Get
Return Me.columnemp_pos
End Get
End Property
Friend ReadOnly Property emp_statColumn As DataColumn
Get
Return Me.columnemp_stat
End Get
End Property
Public Default ReadOnly Property Item(ByVal index As Integer) As tblEmployeeRow
Get
Return CType(Me.Rows(index),tblEmployeeRow)
End Get
End Property
Public Event tblEmployeeRowChanged As tblEmployeeRowChangeEventHandler
Public Event tblEmployeeRowChanging As tblEmployeeRowChangeEventHandler
Public Event tblEmployeeRowDeleted As tblEmployeeRowChangeEventHandler
Public Event tblEmployeeRowDeleting As tblEmployeeRowChangeEventHandler
Public Overloads Sub AddtblEmployeeRow(ByVal row As tblEmployeeRow)
Me.Rows.Add(row)
End Sub
Public Overloads Function AddtblEmployeeRow(ByVal emp_addr As String, ByVal emp_age As Integer, ByVal emp_dob As Date, ByVal emp_fname As String, ByVal emp_idno As String, ByVal emp_lname As String, ByVal emp_mname As String, ByVal emp_pass As String, ByVal emp_pos As String, ByVal emp_stat As String) As tblEmployeeRow
Dim rowtblEmployeeRow As tblEmployeeRow = CType(Me.NewRow,tblEmployeeRow)
rowtblEmployeeRow.ItemArray = New Object() {emp_addr, emp_age, emp_dob, emp_fname, emp_idno, emp_lname, emp_mname, emp_pass, emp_pos, emp_stat}
Me.Rows.Add(rowtblEmployeeRow)
Return rowtblEmployeeRow
End Function
Public Function FindByemp_idno(ByVal emp_idno As String) As tblEmployeeRow
Return CType(Me.Rows.Find(New Object() {emp_idno}),tblEmployeeRow)
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 tblEmployeeDataTable = CType(MyBase.Clone,tblEmployeeDataTable)
cln.InitVars
Return cln
End Function
Protected Overrides Function CreateInstance() As DataTable
Return New tblEmployeeDataTable
End Function
Friend Sub InitVars()
Me.columnemp_addr = Me.Columns("emp_addr")
Me.columnemp_age = Me.Columns("emp_age")
Me.columnemp_dob = Me.Columns("emp_dob")
Me.columnemp_fname = Me.Columns("emp_fname")
Me.columnemp_idno = Me.Columns("emp_idno")
Me.columnemp_lname = Me.Columns("emp_lname")
Me.columnemp_mname = Me.Columns("emp_mname")
Me.columnemp_pass = Me.Columns("emp_pass")
Me.columnemp_pos = Me.Columns("emp_pos")
Me.columnemp_stat = Me.Columns("emp_stat")
End Sub
Private Sub InitClass()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -