⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 productsdataset.designer.vb

📁 Microsoft Mobile Development Handbook的代码,有C#,VB,C++的
💻 VB
📖 第 1 页 / 共 5 页
字号:
        Public ReadOnly Property ListPriceColumn() As System.Data.DataColumn
            Get
                Return Me.columnListPrice
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public ReadOnly Property SizeColumn() As System.Data.DataColumn
            Get
                Return Me.columnSize
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public ReadOnly Property ProductCategoryIDColumn() As System.Data.DataColumn
            Get
                Return Me.columnProductCategoryID
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        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 ProductRow
            Get
                Return CType(Me.Rows(index),ProductRow)
            End Get
        End Property
        
        Public Event ProductRowChanging As ProductRowChangeEventHandler
        
        Public Event ProductRowChanged As ProductRowChangeEventHandler
        
        Public Event ProductRowDeleting As ProductRowChangeEventHandler
        
        Public Event ProductRowDeleted As ProductRowChangeEventHandler
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Overloads Sub AddProductRow(ByVal row As ProductRow)
            Me.Rows.Add(row)
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Overloads Function AddProductRow(ByVal Name As String, ByVal Color As String, ByVal ListPrice As Decimal, ByVal Size As String, ByVal parentProductCategoryRowByProduct_ProductCategory_FK As ProductCategoryRow) As ProductRow
            Dim rowProductRow As ProductRow = CType(Me.NewRow,ProductRow)
            rowProductRow.ItemArray = New Object() {Nothing, Name, Color, ListPrice, Size, parentProductCategoryRowByProduct_ProductCategory_FK(0)}
            Me.Rows.Add(rowProductRow)
            Return rowProductRow
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Function FindByProductID(ByVal ProductID As Integer) As ProductRow
            Return CType(Me.Rows.Find(New Object() {ProductID}),ProductRow)
        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 ProductDataTable = CType(MyBase.Clone,ProductDataTable)
            cln.InitVars
            Return cln
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Function CreateInstance() As System.Data.DataTable
            Return New ProductDataTable
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Friend Sub InitVars()
            Me.columnProductID = MyBase.Columns("ProductID")
            Me.columnName = MyBase.Columns("Name")
            Me.columnColor = MyBase.Columns("Color")
            Me.columnListPrice = MyBase.Columns("ListPrice")
            Me.columnSize = MyBase.Columns("Size")
            Me.columnProductCategoryID = MyBase.Columns("ProductCategoryID")
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Private Sub InitClass()
            Me.columnProductID = New System.Data.DataColumn("ProductID", GetType(Integer), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnProductID)
            Me.columnName = New System.Data.DataColumn("Name", GetType(String), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnName)
            Me.columnColor = New System.Data.DataColumn("Color", GetType(String), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnColor)
            Me.columnListPrice = New System.Data.DataColumn("ListPrice", GetType(Decimal), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnListPrice)
            Me.columnSize = New System.Data.DataColumn("Size", GetType(String), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnSize)
            Me.columnProductCategoryID = New System.Data.DataColumn("ProductCategoryID", GetType(Integer), Nothing, System.Data.MappingType.Element)
            MyBase.Columns.Add(Me.columnProductCategoryID)
            Me.Constraints.Add(New System.Data.UniqueConstraint("Constraint1", New System.Data.DataColumn() {Me.columnProductID}, true))
            Me.columnProductID.AutoIncrement = true
            Me.columnProductID.AllowDBNull = false
            Me.columnProductID.ReadOnly = true
            Me.columnProductID.Unique = true
            Me.columnName.AllowDBNull = false
            Me.columnName.MaxLength = 50
            Me.columnColor.MaxLength = 15
            Me.columnListPrice.AllowDBNull = false
            Me.columnSize.MaxLength = 5
            Me.columnProductCategoryID.AllowDBNull = false
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Function NewProductRow() As ProductRow
            Return CType(Me.NewRow,ProductRow)
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Function NewRowFromBuilder(ByVal builder As System.Data.DataRowBuilder) As System.Data.DataRow
            Return New ProductRow(builder)
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Function GetRowType() As System.Type
            Return GetType(ProductRow)
        End Function
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Protected Overrides Sub OnRowChanged(ByVal e As System.Data.DataRowChangeEventArgs)
            MyBase.OnRowChanged(e)
            If (Not (Me.ProductRowChangedEvent) Is Nothing) Then
                RaiseEvent ProductRowChanged(Me, New ProductRowChangeEvent(CType(e.Row,ProductRow), 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.ProductRowChangingEvent) Is Nothing) Then
                RaiseEvent ProductRowChanging(Me, New ProductRowChangeEvent(CType(e.Row,ProductRow), 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.ProductRowDeletedEvent) Is Nothing) Then
                RaiseEvent ProductRowDeleted(Me, New ProductRowChangeEvent(CType(e.Row,ProductRow), 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.ProductRowDeletingEvent) Is Nothing) Then
                RaiseEvent ProductRowDeleting(Me, New ProductRowChangeEvent(CType(e.Row,ProductRow), e.Action))
            End If
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Sub RemoveProductRow(ByVal row As ProductRow)
            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 ProductsDataSet = New ProductsDataSet
            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 = "ProductDataTable"
            type.Attributes.Add(attribute2)
            type.Particle = sequence
            Return type
        End Function
    End Class
    
    <System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")>  _
    Partial Public Class ProductCategoryDataTable
        Inherits System.Data.DataTable
        Implements System.Collections.IEnumerable
        
        Private columnProductCategoryID As System.Data.DataColumn
        
        Private columnName As System.Data.DataColumn
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Sub New()
            MyBase.New
            Me.TableName = "ProductCategory"
            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()>  _
        Public ReadOnly Property ProductCategoryIDColumn() As System.Data.DataColumn
            Get
                Return Me.columnProductCategoryID
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public ReadOnly Property NameColumn() As System.Data.DataColumn
            Get
                Return Me.columnName
            End Get
        End Property
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        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 ProductCategoryRow
            Get
                Return CType(Me.Rows(index),ProductCategoryRow)
            End Get
        End Property
        
        Public Event ProductCategoryRowChanging As ProductCategoryRowChangeEventHandler
        
        Public Event ProductCategoryRowChanged As ProductCategoryRowChangeEventHandler
        
        Public Event ProductCategoryRowDeleting As ProductCategoryRowChangeEventHandler
        
        Public Event ProductCategoryRowDeleted As ProductCategoryRowChangeEventHandler
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Overloads Sub AddProductCategoryRow(ByVal row As ProductCategoryRow)
            Me.Rows.Add(row)
        End Sub
        
        <System.Diagnostics.DebuggerNonUserCodeAttribute()>  _
        Public Overloads Function AddProductCategoryRow(ByVal Name As String) As ProductCategoryRow
            Dim rowProductCategoryRow As ProductCategoryRow = CType(Me.NewRow,ProductCategoryRow)
            rowProductCategoryRow.ItemArray = New Object() {Nothing, Name}
            Me.Rows.Add(rowProductCategoryRow)
            Return rowProductCategoryRow

⌨️ 快捷键说明

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