adventureworksdataset.designer.vb

来自「讲解visual studio的应用」· VB 代码 · 共 1,318 行 · 第 1/5 页

VB
1,318
字号
            Me.BeginInit
            Me.InitClass
            Me.EndInit
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Friend Sub New(ByVal table As System.Data.DataTable)
            MyBase.New
            Me.TableName = 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
        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)
            Me.InitVars
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public ReadOnly Property CustomerIDColumn() As System.Data.DataColumn
            Get
                Return Me.columnCustomerID
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public ReadOnly Property TerritoryIDColumn() As System.Data.DataColumn
            Get
                Return Me.columnTerritoryID
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public ReadOnly Property AccountNumberColumn() As System.Data.DataColumn
            Get
                Return Me.columnAccountNumber
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public ReadOnly Property CustomerTypeColumn() As System.Data.DataColumn
            Get
                Return Me.columnCustomerType
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public ReadOnly Property rowguidColumn() As System.Data.DataColumn
            Get
                Return Me.columnrowguid
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public ReadOnly Property ModifiedDateColumn() As System.Data.DataColumn
            Get
                Return Me.columnModifiedDate
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
         System.ComponentModel.Browsable(false)>  _
        Public ReadOnly Property Count() As Integer
            Get
                Return Me.Rows.Count
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Default ReadOnly Property Item(ByVal index As Integer) As CustomerRow
            Get
                Return CType(Me.Rows(index),CustomerRow)
            End Get
        End Property
        
        Public Event CustomerRowChanging As CustomerRowChangeEventHandler
        
        Public Event CustomerRowChanged As CustomerRowChangeEventHandler
        
        Public Event CustomerRowDeleting As CustomerRowChangeEventHandler
        
        Public Event CustomerRowDeleted As CustomerRowChangeEventHandler
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Overloads Sub AddCustomerRow(ByVal row As CustomerRow)
            Me.Rows.Add(row)
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Overloads Function AddCustomerRow(ByVal parentSalesTerritoryRowByFK_Customer_SalesTerritory_TerritoryID As SalesTerritoryRow, ByVal AccountNumber As String, ByVal CustomerType As String, ByVal rowguid As System.Guid, ByVal ModifiedDate As Date) As CustomerRow
            Dim rowCustomerRow As CustomerRow = CType(Me.NewRow,CustomerRow)
            rowCustomerRow.ItemArray = New Object() {Nothing, parentSalesTerritoryRowByFK_Customer_SalesTerritory_TerritoryID(0), AccountNumber, CustomerType, rowguid, ModifiedDate}
            Me.Rows.Add(rowCustomerRow)
            Return rowCustomerRow
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Function FindByCustomerID(ByVal CustomerID As Integer) As CustomerRow
            Return CType(Me.Rows.Find(New Object() {CustomerID}),CustomerRow)
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Overridable Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
            Return Me.Rows.GetEnumerator
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Overrides Function Clone() As System.Data.DataTable
            Dim cln As CustomerDataTable = CType(MyBase.Clone,CustomerDataTable)
            cln.InitVars
            Return cln
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Function CreateInstance() As System.Data.DataTable
            Return New CustomerDataTable
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Friend Sub InitVars()
            Me.columnCustomerID = MyBase.Columns("CustomerID")
            Me.columnTerritoryID = MyBase.Columns("TerritoryID")
            Me.columnAccountNumber = MyBase.Columns("AccountNumber")
            Me.columnCustomerType = MyBase.Columns("CustomerType")
            Me.columnrowguid = MyBase.Columns("rowguid")
            Me.columnModifiedDate = MyBase.Columns("ModifiedDate")
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Private Sub InitClass()
            Me.columnCustomerID = New System.Data.DataColumn("CustomerID", GetType(Integer), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnCustomerID)
            Me.columnTerritoryID = New System.Data.DataColumn("TerritoryID", GetType(Integer), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnTerritoryID)
            Me.columnAccountNumber = New System.Data.DataColumn("AccountNumber", GetType(String), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnAccountNumber)
            Me.columnCustomerType = New System.Data.DataColumn("CustomerType", GetType(String), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnCustomerType)
            Me.columnrowguid = New System.Data.DataColumn("rowguid", GetType(System.Guid), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnrowguid)
            Me.columnModifiedDate = New System.Data.DataColumn("ModifiedDate", GetType(Date), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnModifiedDate)
            Me.Constraints.Add(New System.Data.UniqueConstraint("Constraint1", New System.Data.DataColumn() {Me.columnCustomerID}, true))
            Me.columnCustomerID.AutoIncrement = true
            Me.columnCustomerID.AllowDBNull = false
            Me.columnCustomerID.ReadOnly = true
            Me.columnCustomerID.Unique = true
            Me.columnAccountNumber.ReadOnly = true
            Me.columnAccountNumber.MaxLength = 10
            Me.columnCustomerType.AllowDBNull = false
            Me.columnCustomerType.MaxLength = 1
            Me.columnrowguid.AllowDBNull = false
            Me.columnModifiedDate.AllowDBNull = false
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Function NewCustomerRow() As CustomerRow
            Return CType(Me.NewRow,CustomerRow)
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Function NewRowFromBuilder(ByVal builder As System.Data.DataRowBuilder) As System.Data.DataRow
            Return New CustomerRow(builder)
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Function GetRowType() As System.Type
            Return GetType(CustomerRow)
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Sub OnRowChanged(ByVal e As System.Data.DataRowChangeEventArgs)
            MyBase.OnRowChanged(e)
            If (Not (Me.CustomerRowChangedEvent) Is Nothing) Then
                RaiseEvent CustomerRowChanged(Me, New CustomerRowChangeEvent(CType(e.Row,CustomerRow), e.Action))
            End If
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Sub OnRowChanging(ByVal e As System.Data.DataRowChangeEventArgs)
            MyBase.OnRowChanging(e)
            If (Not (Me.CustomerRowChangingEvent) Is Nothing) Then
                RaiseEvent CustomerRowChanging(Me, New CustomerRowChangeEvent(CType(e.Row,CustomerRow), e.Action))
            End If
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Sub OnRowDeleted(ByVal e As System.Data.DataRowChangeEventArgs)
            MyBase.OnRowDeleted(e)
            If (Not (Me.CustomerRowDeletedEvent) Is Nothing) Then
                RaiseEvent CustomerRowDeleted(Me, New CustomerRowChangeEvent(CType(e.Row,CustomerRow), e.Action))
            End If
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Sub OnRowDeleting(ByVal e As System.Data.DataRowChangeEventArgs)
            MyBase.OnRowDeleting(e)
            If (Not (Me.CustomerRowDeletingEvent) Is Nothing) Then
                RaiseEvent CustomerRowDeleting(Me, New CustomerRowChangeEvent(CType(e.Row,CustomerRow), e.Action))
            End If
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Sub RemoveCustomerRow(ByVal row As CustomerRow)
            Me.Rows.Remove(row)
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Shared Function GetTypedTableSchema(ByVal xs As System.Xml.Schema.XmlSchemaSet) As System.Xml.Schema.XmlSchemaComplexType
            Dim type As System.Xml.Schema.XmlSchemaComplexType = New System.Xml.Schema.XmlSchemaComplexType
            Dim sequence As System.Xml.Schema.XmlSchemaSequence = New System.Xml.Schema.XmlSchemaSequence
            Dim ds As AdventureWorksDataSet = New AdventureWorksDataSet
            xs.Add(ds.GetSchemaSerializable)
            Dim any1 As System.Xml.Schema.XmlSchemaAny = New System.Xml.Schema.XmlSchemaAny
            any1.Namespace = "http://www.w3.org/2001/XMLSchema"
            any1.MinOccurs = New Decimal(0)
            any1.MaxOccurs = Decimal.MaxValue
            any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax
            sequence.Items.Add(any1)
            Dim any2 As System.Xml.Schema.XmlSchemaAny = New System.Xml.Schema.XmlSchemaAny
            any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
            any2.MinOccurs = New Decimal(1)
            any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax
            sequence.Items.Add(any2)
            Dim attribute1 As System.Xml.Schema.XmlSchemaAttribute = New System.Xml.Schema.XmlSchemaAttribute
            attribute1.Name = "namespace"
            attribute1.FixedValue = ds.Namespace
            type.Attributes.Add(attribute1)
            Dim attribute2 As System.Xml.Schema.XmlSchemaAttribute = New System.Xml.Schema.XmlSchemaAttribute
            attribute2.Name = "tableTypeName"
            attribute2.FixedValue = "CustomerDataTable"
            type.Attributes.Add(attribute2)
            type.Particle = sequence
            Return type
        End Function
    End Class
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"),  _
     System.Serializable(),  _
     System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")>  _
    Partial Public Class IndividualDataTable
        Inherits System.Data.DataTable
        Implements System.Collections.IEnumerable
        
        Private columnCustomerID As System.Data.DataColumn
        
        Private columnContactID As System.Data.DataColumn
        
        Private columnDemographics As System.Data.DataColumn
        
        Private columnModifiedDate As System.Data.DataColumn
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Sub New()

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?