'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'     Runtime Version:2.0.50727.4952
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.Linq
Imports System.Data.Linq.Mapping
Imports System.Linq
Imports System.Linq.Expressions
Imports System.Reflection


<System.Data.Linq.Mapping.DatabaseAttribute(Name:="DayPilotRecurrence")>  _
Partial Public Class DayPilotDataClassesDataContext
	Inherits System.Data.Linq.DataContext
	
	Private Shared mappingSource As System.Data.Linq.Mapping.MappingSource = New AttributeMappingSource
	
  #Region "Extensibility Method Definitions"
  Partial Private Sub OnCreated()
  End Sub
  Partial Private Sub InsertEv(instance As Ev)
    End Sub
  Partial Private Sub UpdateEv(instance As Ev)
    End Sub
  Partial Private Sub DeleteEv(instance As Ev)
    End Sub
  #End Region
	
	Public Sub New()
		MyBase.New(Global.System.Configuration.ConfigurationManager.ConnectionStrings("DayPilotRecurrenceConnectionString").ConnectionString, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As String)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As System.Data.IDbConnection)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As String, ByVal mappingSource As System.Data.Linq.Mapping.MappingSource)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As System.Data.IDbConnection, ByVal mappingSource As System.Data.Linq.Mapping.MappingSource)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public ReadOnly Property Evs() As System.Data.Linq.Table(Of Ev)
		Get
			Return Me.GetTable(Of Ev)
		End Get
	End Property
End Class

<Table(Name:="dbo.Events")>  _
Partial Public Class Ev
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _id As Integer
	
	Private _eventstart As Date
	
	Private _eventend As Date
	
	Private _name As String
	
	Private _recurrence As String
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnidChanging(value As Integer)
    End Sub
    Partial Private Sub OnidChanged()
    End Sub
    Partial Private Sub OneventstartChanging(value As Date)
    End Sub
    Partial Private Sub OneventstartChanged()
    End Sub
    Partial Private Sub OneventendChanging(value As Date)
    End Sub
    Partial Private Sub OneventendChanged()
    End Sub
    Partial Private Sub OnnameChanging(value As String)
    End Sub
    Partial Private Sub OnnameChanged()
    End Sub
    Partial Private Sub OnrecurrenceChanging(value As String)
    End Sub
    Partial Private Sub OnrecurrenceChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		OnCreated
	End Sub
	
	<Column(Storage:="_id", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)>  _
	Public Property id() As Integer
		Get
			Return Me._id
		End Get
		Set
			If ((Me._id = value)  _
						= false) Then
				Me.OnidChanging(value)
				Me.SendPropertyChanging
				Me._id = value
				Me.SendPropertyChanged("id")
				Me.OnidChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_eventstart", DbType:="DateTime NOT NULL")>  _
	Public Property eventstart() As Date
		Get
			Return Me._eventstart
		End Get
		Set
			If ((Me._eventstart = value)  _
						= false) Then
				Me.OneventstartChanging(value)
				Me.SendPropertyChanging
				Me._eventstart = value
				Me.SendPropertyChanged("eventstart")
				Me.OneventstartChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_eventend", DbType:="DateTime NOT NULL")>  _
	Public Property eventend() As Date
		Get
			Return Me._eventend
		End Get
		Set
			If ((Me._eventend = value)  _
						= false) Then
				Me.OneventendChanging(value)
				Me.SendPropertyChanging
				Me._eventend = value
				Me.SendPropertyChanged("eventend")
				Me.OneventendChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_name", DbType:="VarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property name() As String
		Get
			Return Me._name
		End Get
		Set
			If (String.Equals(Me._name, value) = false) Then
				Me.OnnameChanging(value)
				Me.SendPropertyChanging
				Me._name = value
				Me.SendPropertyChanged("name")
				Me.OnnameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_recurrence", DbType:="VarChar(300)")>  _
	Public Property recurrence() As String
		Get
			Return Me._recurrence
		End Get
		Set
			If (String.Equals(Me._recurrence, value) = false) Then
				Me.OnrecurrenceChanging(value)
				Me.SendPropertyChanging
				Me._recurrence = value
				Me.SendPropertyChanged("recurrence")
				Me.OnrecurrenceChanged
			End If
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
End Class
