📄 invschema.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 InvSchema
Inherits System.Data.DataSet
Private tableDocument As DocumentDataTable
Private tableInvoices As InvoicesDataTable
Private relationDocument_Invoices As DataRelation
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 Document As DocumentDataTable
Get
Return Me.tableDocument
End Get
End Property
<System.ComponentModel.Browsable(false), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property Invoices As InvoicesDataTable
Get
Return Me.tableInvoices
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 = "InvSchema"
Me.Namespace = "http://tempuri.org/InvSchema.xsd"
Me.tableDocument = New DocumentDataTable
Me.Tables.Add(Me.tableDocument)
Me.tableInvoices = New InvoicesDataTable
Me.Tables.Add(Me.tableInvoices)
Me.tableInvoices.Constraints.Add(New System.Data.ForeignKeyConstraint("Document_Invoices", New DataColumn() {Me.tableDocument.Document_IdColumn}, New DataColumn() {Me.tableInvoices.Document_IdColumn}))
Me.relationDocument_Invoices = New DataRelation("Document_Invoices", New DataColumn() {Me.tableDocument.Document_IdColumn}, New DataColumn() {Me.tableInvoices.Document_IdColumn}, false)
Me.relationDocument_Invoices.Nested = true
Me.Relations.Add(Me.relationDocument_Invoices)
End Sub
Private Function ShouldSerializeDocument() As Boolean
Return false
End Function
Private Function ShouldSerializeInvoices() As Boolean
Return false
End Function
Public Delegate Sub DocumentRowChangeEventHandler(ByVal sender As Object, ByVal e As DocumentRowChangeEvent)
Public Delegate Sub InvoicesRowChangeEventHandler(ByVal sender As Object, ByVal e As InvoicesRowChangeEvent)
Public Class DocumentDataTable
Inherits DataTable
Implements System.Collections.IEnumerable
Private columnDocument_Id As DataColumn
Friend Sub New()
MyBase.New("Document")
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 Document_IdColumn As DataColumn
Get
Return Me.columnDocument_Id
End Get
End Property
Public Default ReadOnly Property Item(ByVal index As Integer) As DocumentRow
Get
Return CType(Me.Rows(index),DocumentRow)
End Get
End Property
Public Event DocumentRowChanged As DocumentRowChangeEventHandler
Public Event DocumentRowChanging As DocumentRowChangeEventHandler
Public Event DocumentRowDeleted As DocumentRowChangeEventHandler
Public Event DocumentRowDeleting As DocumentRowChangeEventHandler
Public Overloads Sub AddDocumentRow(ByVal row As DocumentRow)
Me.Rows.Add(row)
End Sub
Public Overloads Function AddDocumentRow() As DocumentRow
Dim rowDocumentRow As DocumentRow = CType(Me.NewRow,DocumentRow)
rowDocumentRow.ItemArray = New Object() {Nothing}
Me.Rows.Add(rowDocumentRow)
Return rowDocumentRow
End Function
Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
Return Me.Rows.GetEnumerator
End Function
Private Sub InitClass()
Me.columnDocument_Id = New DataColumn("Document_Id", GetType(System.Int32), "", System.Data.MappingType.Hidden)
Me.columnDocument_Id.AutoIncrement = true
Me.columnDocument_Id.AllowDBNull = false
Me.columnDocument_Id.Unique = true
Me.Columns.Add(Me.columnDocument_Id)
Me.PrimaryKey = New DataColumn() {Me.columnDocument_Id}
End Sub
Public Function NewDocumentRow() As DocumentRow
Return CType(Me.NewRow,DocumentRow)
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 DocumentRow(builder)
End Function
Protected Overrides Function GetRowType() As System.Type
Return GetType(DocumentRow)
End Function
Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.DocumentRowChangedEvent) Is Nothing) Then
RaiseEvent DocumentRowChanged(Me, New DocumentRowChangeEvent(CType(e.Row,DocumentRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
If (Not (Me.DocumentRowChangingEvent) Is Nothing) Then
RaiseEvent DocumentRowChanging(Me, New DocumentRowChangeEvent(CType(e.Row,DocumentRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleted(e)
If (Not (Me.DocumentRowDeletedEvent) Is Nothing) Then
RaiseEvent DocumentRowDeleted(Me, New DocumentRowChangeEvent(CType(e.Row,DocumentRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleting(e)
If (Not (Me.DocumentRowDeletingEvent) Is Nothing) Then
RaiseEvent DocumentRowDeleting(Me, New DocumentRowChangeEvent(CType(e.Row,DocumentRow), e.Action))
End If
End Sub
Public Sub RemoveDocumentRow(ByVal row As DocumentRow)
Me.Rows.Remove(row)
End Sub
End Class
Public Class DocumentRow
Inherits DataRow
Private tableDocument As DocumentDataTable
Friend Sub New(ByVal rb As DataRowBuilder)
MyBase.New(rb)
Me.tableDocument = CType(Me.Table,DocumentDataTable)
End Sub
Public Function GetInvoicesRows() As InvoicesRow()
Return CType(Me.GetChildRows(Me.Table.ChildRelations("Document_Invoices")),InvoicesRow())
End Function
End Class
Public Class DocumentRowChangeEvent
Inherits EventArgs
Private eventRow As DocumentRow
Private eventAction As System.Data.DataRowAction
Public Sub New(ByVal row As DocumentRow, ByVal action As DataRowAction)
MyBase.New
Me.eventRow = row
Me.eventAction = action
End Sub
Public ReadOnly Property Row As DocumentRow
Get
Return Me.eventRow
End Get
End Property
Public ReadOnly Property Action As DataRowAction
Get
Return Me.eventAction
End Get
End Property
End Class
Public Class InvoicesDataTable
Inherits DataTable
Implements System.Collections.IEnumerable
Private columnInvoiceID As DataColumn
Private columnAmount As DataColumn
Private columnCurrencyName As DataColumn
Private columnCustomerID As DataColumn
Private columnDeliveryID As DataColumn
Private columnDueDate As DataColumn
Private columnPaymentID As DataColumn
Private columnDocument_Id As DataColumn
Friend Sub New()
MyBase.New("Invoices")
Me.InitClass
End Sub
<System.ComponentModel.Browsable(false)> _
Public ReadOnly Property Count As Integer
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -