'------------------------------------------------------------------------------
'
' 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.
'
'------------------------------------------------------------------------------
Option Strict Off
Option Explicit On
Imports System
Imports System.Data
Imports System.Runtime.Serialization
Imports System.Xml
'
'This source code was auto-generated by xsd, Version=1.0.2914.16.
'
_
Public Class TitlesDS
Inherits System.Data.DataSet
Private tableTitles As TitlesDataTable
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
_
Public ReadOnly Property Titles As TitlesDataTable
Get
Return Me.tableTitles
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 = "TitlesDS"
Me.Namespace = ""
Me.tableTitles = New TitlesDataTable
Me.Tables.Add(Me.tableTitles)
End Sub
Private Function ShouldSerializeTitles() As Boolean
Return false
End Function
Public Delegate Sub TitlesRowChangeEventHandler(ByVal sender As Object, ByVal e As TitlesRowChangeEvent)
Public Class TitlesDataTable
Inherits DataTable
Implements System.Collections.IEnumerable
Private columntitle_id As DataColumn
Private columntitle As DataColumn
Private columntype As DataColumn
Private columnpub_id As DataColumn
Private columnprice As DataColumn
Private columnadvance As DataColumn
Private columnroyalty As DataColumn
Private columnytd_sales As DataColumn
Private columnnotes As DataColumn
Private columnpubdate As DataColumn
Friend Sub New()
MyBase.New("Titles")
Me.InitClass
End Sub
_
Public ReadOnly Property Count As Integer
Get
Return Me.Rows.Count
End Get
End Property
Friend ReadOnly Property title_idColumn As DataColumn
Get
Return Me.columntitle_id
End Get
End Property
Friend ReadOnly Property titleColumn As DataColumn
Get
Return Me.columntitle
End Get
End Property
Friend ReadOnly Property typeColumn As DataColumn
Get
Return Me.columntype
End Get
End Property
Friend ReadOnly Property pub_idColumn As DataColumn
Get
Return Me.columnpub_id
End Get
End Property
Friend ReadOnly Property priceColumn As DataColumn
Get
Return Me.columnprice
End Get
End Property
Friend ReadOnly Property advanceColumn As DataColumn
Get
Return Me.columnadvance
End Get
End Property
Friend ReadOnly Property royaltyColumn As DataColumn
Get
Return Me.columnroyalty
End Get
End Property
Friend ReadOnly Property ytd_salesColumn As DataColumn
Get
Return Me.columnytd_sales
End Get
End Property
Friend ReadOnly Property notesColumn As DataColumn
Get
Return Me.columnnotes
End Get
End Property
Friend ReadOnly Property pubdateColumn As DataColumn
Get
Return Me.columnpubdate
End Get
End Property
Public Default ReadOnly Property Item(ByVal index As Integer) As TitlesRow
Get
Return CType(Me.Rows(index),TitlesRow)
End Get
End Property
Public Event TitlesRowChanged As TitlesRowChangeEventHandler
Public Event TitlesRowChanging As TitlesRowChangeEventHandler
Public Event TitlesRowDeleted As TitlesRowChangeEventHandler
Public Event TitlesRowDeleting As TitlesRowChangeEventHandler
Public Overloads Sub AddTitlesRow(ByVal row As TitlesRow)
Me.Rows.Add(row)
End Sub
Public Overloads Function AddTitlesRow(ByVal title_id As String, ByVal title As String, ByVal type As String, ByVal pub_id As String, ByVal price As Decimal, ByVal advance As Decimal, ByVal royalty As Integer, ByVal ytd_sales As Integer, ByVal notes As String, ByVal pubdate As Date) As TitlesRow
Dim rowTitlesRow As TitlesRow = CType(Me.NewRow,TitlesRow)
rowTitlesRow.ItemArray = New Object() {title_id, title, type, pub_id, price, advance, royalty, ytd_sales, notes, pubdate}
Me.Rows.Add(rowTitlesRow)
Return rowTitlesRow
End Function
Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
Return Me.Rows.GetEnumerator
End Function
Private Sub InitClass()
Me.columntitle_id = New DataColumn("title_id", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columntitle_id)
Me.columntitle = New DataColumn("title", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columntitle)
Me.columntype = New DataColumn("type", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columntype)
Me.columnpub_id = New DataColumn("pub_id", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnpub_id)
Me.columnprice = New DataColumn("price", GetType(System.Decimal), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnprice)
Me.columnadvance = New DataColumn("advance", GetType(System.Decimal), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnadvance)
Me.columnroyalty = New DataColumn("royalty", GetType(System.Int32), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnroyalty)
Me.columnytd_sales = New DataColumn("ytd_sales", GetType(System.Int32), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnytd_sales)
Me.columnnotes = New DataColumn("notes", GetType(System.String), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnnotes)
Me.columnpubdate = New DataColumn("pubdate", GetType(System.DateTime), "", System.Data.MappingType.Element)
Me.Columns.Add(Me.columnpubdate)
End Sub
Public Function NewTitlesRow() As TitlesRow
Return CType(Me.NewRow,TitlesRow)
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 TitlesRow(builder)
End Function
Protected Overrides Function GetRowType() As System.Type
Return GetType(TitlesRow)
End Function
Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.TitlesRowChangedEvent) Is Nothing) Then
RaiseEvent TitlesRowChanged(Me, New TitlesRowChangeEvent(CType(e.Row,TitlesRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
If (Not (Me.TitlesRowChangingEvent) Is Nothing) Then
RaiseEvent TitlesRowChanging(Me, New TitlesRowChangeEvent(CType(e.Row,TitlesRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleted(e)
If (Not (Me.TitlesRowDeletedEvent) Is Nothing) Then
RaiseEvent TitlesRowDeleted(Me, New TitlesRowChangeEvent(CType(e.Row,TitlesRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleting(e)
If (Not (Me.TitlesRowDeletingEvent) Is Nothing) Then
RaiseEvent TitlesRowDeleting(Me, New TitlesRowChangeEvent(CType(e.Row,TitlesRow), e.Action))
End If
End Sub
Public Sub RemoveTitlesRow(ByVal row As TitlesRow)
Me.Rows.Remove(row)
End Sub
End Class
Public Class TitlesRow
Inherits DataRow
Private tableTitles As TitlesDataTable
Friend Sub New(ByVal rb As DataRowBuilder)
MyBase.New(rb)
Me.tableTitles = CType(Me.Table,TitlesDataTable)
End Sub
Public Property title_id As String
Get
Try
Return CType(Me(Me.tableTitles.title_idColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableTitles.title_idColumn) = value
End Set
End Property
Public Property title As String
Get
Try
Return CType(Me(Me.tableTitles.titleColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableTitles.titleColumn) = value
End Set
End Property
Public Property type As String
Get
Try
Return CType(Me(Me.tableTitles.typeColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableTitles.typeColumn) = value
End Set
End Property
Public Property pub_id As String
Get
Try
Return CType(Me(Me.tableTitles.pub_idColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableTitles.pub_idColumn) = value
End Set
End Property
Public Property price As Decimal
Get
Try
Return CType(Me(Me.tableTitles.priceColumn),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableTitles.priceColumn) = value
End Set
End Property
Public Property advance As Decimal
Get
Try
Return CType(Me(Me.tableTitles.advanceColumn),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableTitles.advanceColumn) = value
End Set
End Property
Public Property royalty As Integer
Get
Try
Return CType(Me(Me.tableTitles.royaltyColumn),Integer)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableTitles.royaltyColumn) = value
End Set
End Property
Public Property ytd_sales As Integer
Get
Try
Return CType(Me(Me.tableTitles.ytd_salesColumn),Integer)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableTitles.ytd_salesColumn) = value
End Set
End Property
Public Property notes As String
Get
Try
Return CType(Me(Me.tableTitles.notesColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableTitles.notesColumn) = value
End Set
End Property
Public Property pubdate As Date
Get
Try
Return CType(Me(Me.tableTitles.pubdateColumn),Date)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableTitles.pubdateColumn) = value
End Set
End Property
Public Function Istitle_idNull() As Boolean
Return Me.IsNull(Me.tableTitles.title_idColumn)
End Function
Public Sub Settitle_idNull()
Me(Me.tableTitles.title_idColumn) = System.Convert.DBNull
End Sub
Public Function IstitleNull() As Boolean
Return Me.IsNull(Me.tableTitles.titleColumn)
End Function
Public Sub SettitleNull()
Me(Me.tableTitles.titleColumn) = System.Convert.DBNull
End Sub
Public Function IstypeNull() As Boolean
Return Me.IsNull(Me.tableTitles.typeColumn)
End Function
Public Sub SettypeNull()
Me(Me.tableTitles.typeColumn) = System.Convert.DBNull
End Sub
Public Function Ispub_idNull() As Boolean
Return Me.IsNull(Me.tableTitles.pub_idColumn)
End Function
Public Sub Setpub_idNull()
Me(Me.tableTitles.pub_idColumn) = System.Convert.DBNull
End Sub
Public Function IspriceNull() As Boolean
Return Me.IsNull(Me.tableTitles.priceColumn)
End Function
Public Sub SetpriceNull()
Me(Me.tableTitles.priceColumn) = System.Convert.DBNull
End Sub
Public Function IsadvanceNull() As Boolean
Return Me.IsNull(Me.tableTitles.advanceColumn)
End Function
Public Sub SetadvanceNull()
Me(Me.tableTitles.advanceColumn) = System.Convert.DBNull
End Sub
Public Function IsroyaltyNull() As Boolean
Return Me.IsNull(Me.tableTitles.royaltyColumn)
End Function
Public Sub SetroyaltyNull()
Me(Me.tableTitles.royaltyColumn) = System.Convert.DBNull
End Sub
Public Function Isytd_salesNull() As Boolean
Return Me.IsNull(Me.tableTitles.ytd_salesColumn)
End Function
Public Sub Setytd_salesNull()
Me(Me.tableTitles.ytd_salesColumn) = System.Convert.DBNull
End Sub
Public Function IsnotesNull() As Boolean
Return Me.IsNull(Me.tableTitles.notesColumn)
End Function
Public Sub SetnotesNull()
Me(Me.tableTitles.notesColumn) = System.Convert.DBNull
End Sub
Public Function IspubdateNull() As Boolean
Return Me.IsNull(Me.tableTitles.pubdateColumn)
End Function
Public Sub SetpubdateNull()
Me(Me.tableTitles.pubdateColumn) = System.Convert.DBNull
End Sub
End Class
Public Class TitlesRowChangeEvent
Inherits EventArgs
Private eventRow As TitlesRow
Private eventAction As System.Data.DataRowAction
Public Sub New(ByVal row As TitlesRow, ByVal action As DataRowAction)
MyBase.New
Me.eventRow = row
Me.eventAction = action
End Sub
Public ReadOnly Property Row As TitlesRow
Get
Return Me.eventRow
End Get
End Property
Public ReadOnly Property Action As DataRowAction
Get
Return Me.eventAction
End Get
End Property
End Class
End Class