'------------------------------------------------------------------------------
' <auto-generated>
'     此代码由工具生成。
'     运行时版本:2.0.50727.3649
'
'     对此文件的更改可能会导致不正确的行为，并且如果
'     重新生成代码，这些更改将会丢失。
' </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:="WebSiteII")>  _
Partial Public Class DB_TemplateDataContext
	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 InsertTemplateClass(instance As TemplateClass)
    End Sub
  Partial Private Sub UpdateTemplateClass(instance As TemplateClass)
    End Sub
  Partial Private Sub DeleteTemplateClass(instance As TemplateClass)
    End Sub
  Partial Private Sub InsertTemplateList(instance As TemplateList)
    End Sub
  Partial Private Sub UpdateTemplateList(instance As TemplateList)
    End Sub
  Partial Private Sub DeleteTemplateList(instance As TemplateList)
    End Sub
  Partial Private Sub InsertTemplateURL(instance As TemplateURL)
    End Sub
  Partial Private Sub UpdateTemplateURL(instance As TemplateURL)
    End Sub
  Partial Private Sub DeleteTemplateURL(instance As TemplateURL)
    End Sub
  #End Region
	
	Public Sub New()
        MyBase.New(System.Web.Configuration.WebConfigurationManager.ConnectionStrings("XrenCRMConnString").ToString, 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 TemplateClass() As System.Data.Linq.Table(Of TemplateClass)
		Get
			Return Me.GetTable(Of TemplateClass)
		End Get
	End Property
	
	Public ReadOnly Property TemplateList() As System.Data.Linq.Table(Of TemplateList)
		Get
			Return Me.GetTable(Of TemplateList)
		End Get
	End Property
	
	Public ReadOnly Property TemplateURL() As System.Data.Linq.Table(Of TemplateURL)
		Get
			Return Me.GetTable(Of TemplateURL)
		End Get
	End Property
End Class

<Table(Name:="dbo.TemplateClass")>  _
Partial Public Class TemplateClass
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _SiteID As Integer
	
	Private _ClassName 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 OnSiteIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnSiteIDChanged()
    End Sub
    Partial Private Sub OnClassNameChanging(value As String)
    End Sub
    Partial Private Sub OnClassNameChanged()
    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:="_SiteID", DbType:="Int NOT NULL")>  _
	Public Property SiteID() As Integer
		Get
			Return Me._SiteID
		End Get
		Set
			If ((Me._SiteID = value)  _
						= false) Then
				Me.OnSiteIDChanging(value)
				Me.SendPropertyChanging
				Me._SiteID = value
				Me.SendPropertyChanged("SiteID")
				Me.OnSiteIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ClassName", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property ClassName() As String
		Get
			Return Me._ClassName
		End Get
		Set
			If (String.Equals(Me._ClassName, value) = false) Then
				Me.OnClassNameChanging(value)
				Me.SendPropertyChanging
				Me._ClassName = value
				Me.SendPropertyChanged("ClassName")
				Me.OnClassNameChanged
			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

<Table(Name:="dbo.TemplateList")>  _
Partial Public Class TemplateList
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _ClassID As Integer
	
	Private _TmpName As String
	
	Private _FileName As String
	
	Private _IsDefault As Boolean
	
	Private _TmpContent 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 OnClassIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnClassIDChanged()
    End Sub
    Partial Private Sub OnTmpNameChanging(value As String)
    End Sub
    Partial Private Sub OnTmpNameChanged()
    End Sub
    Partial Private Sub OnFileNameChanging(value As String)
    End Sub
    Partial Private Sub OnFileNameChanged()
    End Sub
    Partial Private Sub OnIsDefaultChanging(value As Boolean)
    End Sub
    Partial Private Sub OnIsDefaultChanged()
    End Sub
    Partial Private Sub OnTmpContentChanging(value As String)
    End Sub
    Partial Private Sub OnTmpContentChanged()
    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:="_ClassID", DbType:="Int NOT NULL")>  _
	Public Property ClassID() As Integer
		Get
			Return Me._ClassID
		End Get
		Set
			If ((Me._ClassID = value)  _
						= false) Then
				Me.OnClassIDChanging(value)
				Me.SendPropertyChanging
				Me._ClassID = value
				Me.SendPropertyChanged("ClassID")
				Me.OnClassIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_TmpName", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property TmpName() As String
		Get
			Return Me._TmpName
		End Get
		Set
			If (String.Equals(Me._TmpName, value) = false) Then
				Me.OnTmpNameChanging(value)
				Me.SendPropertyChanging
				Me._TmpName = value
				Me.SendPropertyChanged("TmpName")
				Me.OnTmpNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_FileName", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property FileName() As String
		Get
			Return Me._FileName
		End Get
		Set
			If (String.Equals(Me._FileName, value) = false) Then
				Me.OnFileNameChanging(value)
				Me.SendPropertyChanging
				Me._FileName = value
				Me.SendPropertyChanged("FileName")
				Me.OnFileNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_IsDefault", DbType:="Bit NOT NULL")>  _
	Public Property IsDefault() As Boolean
		Get
			Return Me._IsDefault
		End Get
		Set
			If ((Me._IsDefault = value)  _
						= false) Then
				Me.OnIsDefaultChanging(value)
				Me.SendPropertyChanging
				Me._IsDefault = value
				Me.SendPropertyChanged("IsDefault")
				Me.OnIsDefaultChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_TmpContent", DbType:="NText", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property TmpContent() As String
		Get
			Return Me._TmpContent
		End Get
		Set
			If (String.Equals(Me._TmpContent, value) = false) Then
				Me.OnTmpContentChanging(value)
				Me.SendPropertyChanging
				Me._TmpContent = value
				Me.SendPropertyChanged("TmpContent")
				Me.OnTmpContentChanged
			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

<Table(Name:="dbo.TemplateURL")>  _
Partial Public Class TemplateURL
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _SiteID As Integer
	
	Private _TmpID As Integer
	
	Private _LastWriteTime As Date
	
	Private _LookFor As String
	
	Private _SendTo 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 OnSiteIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnSiteIDChanged()
    End Sub
    Partial Private Sub OnTmpIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnTmpIDChanged()
    End Sub
    Partial Private Sub OnLastWriteTimeChanging(value As Date)
    End Sub
    Partial Private Sub OnLastWriteTimeChanged()
    End Sub
    Partial Private Sub OnLookForChanging(value As String)
    End Sub
    Partial Private Sub OnLookForChanged()
    End Sub
    Partial Private Sub OnSendToChanging(value As String)
    End Sub
    Partial Private Sub OnSendToChanged()
    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:="_SiteID", DbType:="Int NOT NULL")>  _
	Public Property SiteID() As Integer
		Get
			Return Me._SiteID
		End Get
		Set
			If ((Me._SiteID = value)  _
						= false) Then
				Me.OnSiteIDChanging(value)
				Me.SendPropertyChanging
				Me._SiteID = value
				Me.SendPropertyChanged("SiteID")
				Me.OnSiteIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_TmpID", DbType:="Int NOT NULL")>  _
	Public Property TmpID() As Integer
		Get
			Return Me._TmpID
		End Get
		Set
			If ((Me._TmpID = value)  _
						= false) Then
				Me.OnTmpIDChanging(value)
				Me.SendPropertyChanging
				Me._TmpID = value
				Me.SendPropertyChanged("TmpID")
				Me.OnTmpIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_LastWriteTime", DbType:="DateTime NOT NULL")>  _
	Public Property LastWriteTime() As Date
		Get
			Return Me._LastWriteTime
		End Get
		Set
			If ((Me._LastWriteTime = value)  _
						= false) Then
				Me.OnLastWriteTimeChanging(value)
				Me.SendPropertyChanging
				Me._LastWriteTime = value
				Me.SendPropertyChanged("LastWriteTime")
				Me.OnLastWriteTimeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_LookFor", DbType:="NVarChar(500) NOT NULL", CanBeNull:=false)>  _
	Public Property LookFor() As String
		Get
			Return Me._LookFor
		End Get
		Set
			If (String.Equals(Me._LookFor, value) = false) Then
				Me.OnLookForChanging(value)
				Me.SendPropertyChanging
				Me._LookFor = value
				Me.SendPropertyChanged("LookFor")
				Me.OnLookForChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_SendTo", DbType:="NVarChar(500) NOT NULL", CanBeNull:=false)>  _
	Public Property SendTo() As String
		Get
			Return Me._SendTo
		End Get
		Set
			If (String.Equals(Me._SendTo, value) = false) Then
				Me.OnSendToChanging(value)
				Me.SendPropertyChanging
				Me._SendTo = value
				Me.SendPropertyChanged("SendTo")
				Me.OnSendToChanged
			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
