'------------------------------------------------------------------------------
' <autogenerated>
'     This code was generated by a tool.
'     Runtime Version: 1.0.3705.0
'
'     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"),  _
 System.Diagnostics.DebuggerStepThrough(),  _
 System.ComponentModel.ToolboxItem(true)>  _
Public Class dsAllEvents
    Inherits DataSet
    
    Private tableas_Events As as_EventsDataTable
    
    Public Sub New()
        MyBase.New
        Me.InitClass
        Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
        AddHandler Me.Tables.CollectionChanged, schemaChangedHandler
        AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
    End Sub
    
    Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
        MyBase.New
        Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(System.String)),String)
        If (Not (strSchema) Is Nothing) Then
            Dim ds As DataSet = New DataSet
            ds.ReadXmlSchema(New XmlTextReader(New System.IO.StringReader(strSchema)))
            If (Not (ds.Tables("as_Events")) Is Nothing) Then
                Me.Tables.Add(New as_EventsDataTable(ds.Tables("as_Events")))
            End If
            Me.DataSetName = ds.DataSetName
            Me.Prefix = ds.Prefix
            Me.Namespace = ds.Namespace
            Me.Locale = ds.Locale
            Me.CaseSensitive = ds.CaseSensitive
            Me.EnforceConstraints = ds.EnforceConstraints
            Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
            Me.InitVars
        Else
            Me.InitClass
        End If
        Me.GetSerializationData(info, context)
        Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
        AddHandler Me.Tables.CollectionChanged, schemaChangedHandler
        AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
    End Sub
    
    <System.ComponentModel.Browsable(false),  _
     System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)>  _
    Public ReadOnly Property as_Events As as_EventsDataTable
        Get
            Return Me.tableas_Events
        End Get
    End Property
    
    Public Overrides Function Clone() As DataSet
        Dim cln As dsAllEvents = CType(MyBase.Clone,dsAllEvents)
        cln.InitVars
        Return cln
    End Function
    
    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.Reset
        Dim ds As DataSet = New DataSet
        ds.ReadXml(reader)
        If (Not (ds.Tables("as_Events")) Is Nothing) Then
            Me.Tables.Add(New as_EventsDataTable(ds.Tables("as_Events")))
        End If
        Me.DataSetName = ds.DataSetName
        Me.Prefix = ds.Prefix
        Me.Namespace = ds.Namespace
        Me.Locale = ds.Locale
        Me.CaseSensitive = ds.CaseSensitive
        Me.EnforceConstraints = ds.EnforceConstraints
        Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
        Me.InitVars
    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
    
    Friend Sub InitVars()
        Me.tableas_Events = CType(Me.Tables("as_Events"),as_EventsDataTable)
        If (Not (Me.tableas_Events) Is Nothing) Then
            Me.tableas_Events.InitVars
        End If
    End Sub
    
    Private Sub InitClass()
        Me.DataSetName = "dsAllEvents"
        Me.Prefix = ""
        Me.Namespace = "http://www.tempuri.org/dsAllEvents.xsd"
        Me.Locale = New System.Globalization.CultureInfo("en-US")
        Me.CaseSensitive = false
        Me.EnforceConstraints = true
        Me.tableas_Events = New as_EventsDataTable
        Me.Tables.Add(Me.tableas_Events)
    End Sub
    
    Private Function ShouldSerializeas_Events() As Boolean
        Return false
    End Function
    
    Private Sub SchemaChanged(ByVal sender As Object, ByVal e As System.ComponentModel.CollectionChangeEventArgs)
        If (e.Action = System.ComponentModel.CollectionChangeAction.Remove) Then
            Me.InitVars
        End If
    End Sub
    
    Public Delegate Sub as_EventsRowChangeEventHandler(ByVal sender As Object, ByVal e As as_EventsRowChangeEvent)
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class as_EventsDataTable
        Inherits DataTable
        Implements System.Collections.IEnumerable
        
        Private columnEventID As DataColumn
        
        Private columnPageID As DataColumn
        
        Private columnEventDate As DataColumn
        
        Private columnDetails As DataColumn
        
        Friend Sub New()
            MyBase.New("as_Events")
            Me.InitClass
        End Sub
        
        Friend Sub New(ByVal table As DataTable)
            MyBase.New(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
            Me.DisplayExpression = table.DisplayExpression
        End Sub
        
        <System.ComponentModel.Browsable(false)>  _
        Public ReadOnly Property Count As Integer
            Get
                Return Me.Rows.Count
            End Get
        End Property
        
        Friend ReadOnly Property EventIDColumn As DataColumn
            Get
                Return Me.columnEventID
            End Get
        End Property
        
        Friend ReadOnly Property PageIDColumn As DataColumn
            Get
                Return Me.columnPageID
            End Get
        End Property
        
        Friend ReadOnly Property EventDateColumn As DataColumn
            Get
                Return Me.columnEventDate
            End Get
        End Property
        
        Friend ReadOnly Property DetailsColumn As DataColumn
            Get
                Return Me.columnDetails
            End Get
        End Property
        
        Public Default ReadOnly Property Item(ByVal index As Integer) As as_EventsRow
            Get
                Return CType(Me.Rows(index),as_EventsRow)
            End Get
        End Property
        
        Public Event as_EventsRowChanged As as_EventsRowChangeEventHandler
        
        Public Event as_EventsRowChanging As as_EventsRowChangeEventHandler
        
        Public Event as_EventsRowDeleted As as_EventsRowChangeEventHandler
        
        Public Event as_EventsRowDeleting As as_EventsRowChangeEventHandler
        
        Public Overloads Sub Addas_EventsRow(ByVal row As as_EventsRow)
            Me.Rows.Add(row)
        End Sub
        
        Public Overloads Function Addas_EventsRow(ByVal PageID As Integer, ByVal EventDate As Date, ByVal Details As String) As as_EventsRow
            Dim rowas_EventsRow As as_EventsRow = CType(Me.NewRow,as_EventsRow)
            rowas_EventsRow.ItemArray = New Object() {Nothing, PageID, EventDate, Details}
            Me.Rows.Add(rowas_EventsRow)
            Return rowas_EventsRow
        End Function
        
        Public Function FindByEventID(ByVal EventID As Integer) As as_EventsRow
            Return CType(Me.Rows.Find(New Object() {EventID}),as_EventsRow)
        End Function
        
        Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
            Return Me.Rows.GetEnumerator
        End Function
        
        Public Overrides Function Clone() As DataTable
            Dim cln As as_EventsDataTable = CType(MyBase.Clone,as_EventsDataTable)
            cln.InitVars
            Return cln
        End Function
        
        Protected Overrides Function CreateInstance() As DataTable
            Return New as_EventsDataTable
        End Function
        
        Friend Sub InitVars()
            Me.columnEventID = Me.Columns("EventID")
            Me.columnPageID = Me.Columns("PageID")
            Me.columnEventDate = Me.Columns("EventDate")
            Me.columnDetails = Me.Columns("Details")
        End Sub
        
        Private Sub InitClass()
            Me.columnEventID = New DataColumn("EventID", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnEventID)
            Me.columnPageID = New DataColumn("PageID", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnPageID)
            Me.columnEventDate = New DataColumn("EventDate", GetType(System.DateTime), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnEventDate)
            Me.columnDetails = New DataColumn("Details", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnDetails)
            Me.Constraints.Add(New UniqueConstraint("Constraint1", New DataColumn() {Me.columnEventID}, true))
            Me.columnEventID.AutoIncrement = true
            Me.columnEventID.AllowDBNull = false
            Me.columnEventID.ReadOnly = true
            Me.columnEventID.Unique = true
            Me.columnPageID.AllowDBNull = false
            Me.columnEventDate.AllowDBNull = false
            Me.columnDetails.AllowDBNull = false
        End Sub
        
        Public Function Newas_EventsRow() As as_EventsRow
            Return CType(Me.NewRow,as_EventsRow)
        End Function
        
        Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
            Return New as_EventsRow(builder)
        End Function
        
        Protected Overrides Function GetRowType() As System.Type
            Return GetType(as_EventsRow)
        End Function
        
        Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanged(e)
            If (Not (Me.as_EventsRowChangedEvent) Is Nothing) Then
                RaiseEvent as_EventsRowChanged(Me, New as_EventsRowChangeEvent(CType(e.Row,as_EventsRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanging(e)
            If (Not (Me.as_EventsRowChangingEvent) Is Nothing) Then
                RaiseEvent as_EventsRowChanging(Me, New as_EventsRowChangeEvent(CType(e.Row,as_EventsRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleted(e)
            If (Not (Me.as_EventsRowDeletedEvent) Is Nothing) Then
                RaiseEvent as_EventsRowDeleted(Me, New as_EventsRowChangeEvent(CType(e.Row,as_EventsRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleting(e)
            If (Not (Me.as_EventsRowDeletingEvent) Is Nothing) Then
                RaiseEvent as_EventsRowDeleting(Me, New as_EventsRowChangeEvent(CType(e.Row,as_EventsRow), e.Action))
            End If
        End Sub
        
        Public Sub Removeas_EventsRow(ByVal row As as_EventsRow)
            Me.Rows.Remove(row)
        End Sub
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class as_EventsRow
        Inherits DataRow
        
        Private tableas_Events As as_EventsDataTable
        
        Friend Sub New(ByVal rb As DataRowBuilder)
            MyBase.New(rb)
            Me.tableas_Events = CType(Me.Table,as_EventsDataTable)
        End Sub
        
        Public Property EventID As Integer
            Get
                Return CType(Me(Me.tableas_Events.EventIDColumn),Integer)
            End Get
            Set
                Me(Me.tableas_Events.EventIDColumn) = value
            End Set
        End Property
        
        Public Property PageID As Integer
            Get
                Return CType(Me(Me.tableas_Events.PageIDColumn),Integer)
            End Get
            Set
                Me(Me.tableas_Events.PageIDColumn) = value
            End Set
        End Property
        
        Public Property EventDate As Date
            Get
                Return CType(Me(Me.tableas_Events.EventDateColumn),Date)
            End Get
            Set
                Me(Me.tableas_Events.EventDateColumn) = value
            End Set
        End Property
        
        Public Property Details As String
            Get
                Return CType(Me(Me.tableas_Events.DetailsColumn),String)
            End Get
            Set
                Me(Me.tableas_Events.DetailsColumn) = value
            End Set
        End Property
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class as_EventsRowChangeEvent
        Inherits EventArgs
        
        Private eventRow As as_EventsRow
        
        Private eventAction As DataRowAction
        
        Public Sub New(ByVal row As as_EventsRow, ByVal action As DataRowAction)
            MyBase.New
            Me.eventRow = row
            Me.eventAction = action
        End Sub
        
        Public ReadOnly Property Row As as_EventsRow
            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
