📄 adventureworksdataset.designer.vb
字号:
Private columnLargePhotoFileName As System.Data.DataColumn
Private columnModifiedDate As System.Data.DataColumn
Public Sub New()
MyBase.New
Me.TableName = "ProductPhoto"
Me.BeginInit
Me.InitClass
Me.EndInit
End Sub
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
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
Public ReadOnly Property ProductPhotoIDColumn() As System.Data.DataColumn
Get
Return Me.columnProductPhotoID
End Get
End Property
Public ReadOnly Property ThumbNailPhotoColumn() As System.Data.DataColumn
Get
Return Me.columnThumbNailPhoto
End Get
End Property
Public ReadOnly Property ThumbnailPhotoFileNameColumn() As System.Data.DataColumn
Get
Return Me.columnThumbnailPhotoFileName
End Get
End Property
Public ReadOnly Property LargePhotoColumn() As System.Data.DataColumn
Get
Return Me.columnLargePhoto
End Get
End Property
Public ReadOnly Property LargePhotoFileNameColumn() As System.Data.DataColumn
Get
Return Me.columnLargePhotoFileName
End Get
End Property
Public ReadOnly Property ModifiedDateColumn() As System.Data.DataColumn
Get
Return Me.columnModifiedDate
End Get
End Property
<System.ComponentModel.Browsable(false)> _
Public ReadOnly Property Count() As Integer
Get
Return Me.Rows.Count
End Get
End Property
Public Default ReadOnly Property Item(ByVal index As Integer) As ProductPhotoRow
Get
Return CType(Me.Rows(index),ProductPhotoRow)
End Get
End Property
Public Event ProductPhotoRowChanged As ProductPhotoRowChangeEventHandler
Public Event ProductPhotoRowChanging As ProductPhotoRowChangeEventHandler
Public Event ProductPhotoRowDeleted As ProductPhotoRowChangeEventHandler
Public Event ProductPhotoRowDeleting As ProductPhotoRowChangeEventHandler
Public Overloads Sub AddProductPhotoRow(ByVal row As ProductPhotoRow)
Me.Rows.Add(row)
End Sub
Public Overloads Function AddProductPhotoRow(ByVal ThumbNailPhoto() As Byte, ByVal ThumbnailPhotoFileName As String, ByVal LargePhoto() As Byte, ByVal LargePhotoFileName As String, ByVal ModifiedDate As Date) As ProductPhotoRow
Dim rowProductPhotoRow As ProductPhotoRow = CType(Me.NewRow,ProductPhotoRow)
rowProductPhotoRow.ItemArray = New Object() {Nothing, ThumbNailPhoto, ThumbnailPhotoFileName, LargePhoto, LargePhotoFileName, ModifiedDate}
Me.Rows.Add(rowProductPhotoRow)
Return rowProductPhotoRow
End Function
Public Function FindByProductPhotoID(ByVal ProductPhotoID As Integer) As ProductPhotoRow
Return CType(Me.Rows.Find(New Object() {ProductPhotoID}),ProductPhotoRow)
End Function
Public Overridable Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
Return Me.Rows.GetEnumerator
End Function
Public Overrides Function Clone() As System.Data.DataTable
Dim cln As ProductPhotoDataTable = CType(MyBase.Clone,ProductPhotoDataTable)
cln.InitVars
Return cln
End Function
Protected Overrides Function CreateInstance() As System.Data.DataTable
Return New ProductPhotoDataTable
End Function
Friend Sub InitVars()
Me.columnProductPhotoID = MyBase.Columns("ProductPhotoID")
Me.columnThumbNailPhoto = MyBase.Columns("ThumbNailPhoto")
Me.columnThumbnailPhotoFileName = MyBase.Columns("ThumbnailPhotoFileName")
Me.columnLargePhoto = MyBase.Columns("LargePhoto")
Me.columnLargePhotoFileName = MyBase.Columns("LargePhotoFileName")
Me.columnModifiedDate = MyBase.Columns("ModifiedDate")
End Sub
Private Sub InitClass()
Me.columnProductPhotoID = New System.Data.DataColumn("ProductPhotoID", GetType(Integer), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnProductPhotoID)
Me.columnThumbNailPhoto = New System.Data.DataColumn("ThumbNailPhoto", GetType(Byte()), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnThumbNailPhoto)
Me.columnThumbnailPhotoFileName = New System.Data.DataColumn("ThumbnailPhotoFileName", GetType(String), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnThumbnailPhotoFileName)
Me.columnLargePhoto = New System.Data.DataColumn("LargePhoto", GetType(Byte()), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnLargePhoto)
Me.columnLargePhotoFileName = New System.Data.DataColumn("LargePhotoFileName", GetType(String), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnLargePhotoFileName)
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.columnProductPhotoID}, true))
Me.columnProductPhotoID.AutoIncrement = true
Me.columnProductPhotoID.AllowDBNull = false
Me.columnProductPhotoID.ReadOnly = true
Me.columnProductPhotoID.Unique = true
Me.columnThumbnailPhotoFileName.MaxLength = 50
Me.columnLargePhotoFileName.MaxLength = 50
Me.columnModifiedDate.AllowDBNull = false
End Sub
Public Function NewProductPhotoRow() As ProductPhotoRow
Return CType(Me.NewRow,ProductPhotoRow)
End Function
Protected Overrides Function NewRowFromBuilder(ByVal builder As System.Data.DataRowBuilder) As System.Data.DataRow
Return New ProductPhotoRow(builder)
End Function
Protected Overrides Function GetRowType() As System.Type
Return GetType(ProductPhotoRow)
End Function
Protected Overrides Sub OnRowChanged(ByVal e As System.Data.DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.ProductPhotoRowChangedEvent) Is Nothing) Then
RaiseEvent ProductPhotoRowChanged(Me, New ProductPhotoRowChangeEvent(CType(e.Row,ProductPhotoRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowChanging(ByVal e As System.Data.DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
If (Not (Me.ProductPhotoRowChangingEvent) Is Nothing) Then
RaiseEvent ProductPhotoRowChanging(Me, New ProductPhotoRowChangeEvent(CType(e.Row,ProductPhotoRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleted(ByVal e As System.Data.DataRowChangeEventArgs)
MyBase.OnRowDeleted(e)
If (Not (Me.ProductPhotoRowDeletedEvent) Is Nothing) Then
RaiseEvent ProductPhotoRowDeleted(Me, New ProductPhotoRowChangeEvent(CType(e.Row,ProductPhotoRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleting(ByVal e As System.Data.DataRowChangeEventArgs)
MyBase.OnRowDeleting(e)
If (Not (Me.ProductPhotoRowDeletingEvent) Is Nothing) Then
RaiseEvent ProductPhotoRowDeleting(Me, New ProductPhotoRowChangeEvent(CType(e.Row,ProductPhotoRow), e.Action))
End If
End Sub
Public Sub RemoveProductPhotoRow(ByVal row As ProductPhotoRow)
Me.Rows.Remove(row)
End Sub
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 = "ProductPhotoDataTable"
type.Attributes.Add(attribute2)
type.Particle = sequence
Return type
End Function
End Class
Partial Public Class ProductPhotoRow
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -