'------------------------------------------------------------------------------
' <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_SQLDataContext
	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 InsertTableData(instance As TableData)
    End Sub
  Partial Private Sub UpdateTableData(instance As TableData)
    End Sub
  Partial Private Sub DeleteTableData(instance As TableData)
    End Sub
  Partial Private Sub InsertSQLClass(instance As SQLClass)
    End Sub
  Partial Private Sub UpdateSQLClass(instance As SQLClass)
    End Sub
  Partial Private Sub DeleteSQLClass(instance As SQLClass)
    End Sub
  Partial Private Sub InsertSQLUrl(instance As SQLUrl)
    End Sub
  Partial Private Sub UpdateSQLUrl(instance As SQLUrl)
    End Sub
  Partial Private Sub DeleteSQLUrl(instance As SQLUrl)
    End Sub
  Partial Private Sub InsertSQLTemplate(instance As SQLTemplate)
    End Sub
  Partial Private Sub UpdateSQLTemplate(instance As SQLTemplate)
    End Sub
  Partial Private Sub DeleteSQLTemplate(instance As SQLTemplate)
    End Sub
  Partial Private Sub InsertTableFields(instance As TableFields)
    End Sub
  Partial Private Sub UpdateTableFields(instance As TableFields)
    End Sub
  Partial Private Sub DeleteTableFields(instance As TableFields)
    End Sub
  Partial Private Sub InsertSQLDesign(instance As SQLDesign)
    End Sub
  Partial Private Sub UpdateSQLDesign(instance As SQLDesign)
    End Sub
  Partial Private Sub DeleteSQLDesign(instance As SQLDesign)
    End Sub
  Partial Private Sub InsertSQLData(instance As SQLData)
    End Sub
  Partial Private Sub UpdateSQLData(instance As SQLData)
    End Sub
  Partial Private Sub DeleteSQLData(instance As SQLData)
    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 TableData() As System.Data.Linq.Table(Of TableData)
		Get
			Return Me.GetTable(Of TableData)
		End Get
	End Property
	
	Public ReadOnly Property SQLClass() As System.Data.Linq.Table(Of SQLClass)
		Get
			Return Me.GetTable(Of SQLClass)
		End Get
	End Property
	
	Public ReadOnly Property SQLUrl() As System.Data.Linq.Table(Of SQLUrl)
		Get
			Return Me.GetTable(Of SQLUrl)
		End Get
	End Property
	
	Public ReadOnly Property SQLTemplate() As System.Data.Linq.Table(Of SQLTemplate)
		Get
			Return Me.GetTable(Of SQLTemplate)
		End Get
	End Property
	
	Public ReadOnly Property TableFields() As System.Data.Linq.Table(Of TableFields)
		Get
			Return Me.GetTable(Of TableFields)
		End Get
	End Property
	
	Public ReadOnly Property SQLDesign() As System.Data.Linq.Table(Of SQLDesign)
		Get
			Return Me.GetTable(Of SQLDesign)
		End Get
	End Property
	
	Public ReadOnly Property SQLData() As System.Data.Linq.Table(Of SQLData)
		Get
			Return Me.GetTable(Of SQLData)
		End Get
	End Property
End Class

<Table(Name:="dbo.TableData")>  _
Partial Public Class TableData
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _TableName As String
	
	Private _TableNote 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 OnTableNameChanging(value As String)
    End Sub
    Partial Private Sub OnTableNameChanged()
    End Sub
    Partial Private Sub OnTableNoteChanging(value As String)
    End Sub
    Partial Private Sub OnTableNoteChanged()
    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:="_TableName", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property TableName() As String
		Get
			Return Me._TableName
		End Get
		Set
			If (String.Equals(Me._TableName, value) = false) Then
				Me.OnTableNameChanging(value)
				Me.SendPropertyChanging
				Me._TableName = value
				Me.SendPropertyChanged("TableName")
				Me.OnTableNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_TableNote", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property TableNote() As String
		Get
			Return Me._TableNote
		End Get
		Set
			If (String.Equals(Me._TableNote, value) = false) Then
				Me.OnTableNoteChanging(value)
				Me.SendPropertyChanging
				Me._TableNote = value
				Me.SendPropertyChanged("TableNote")
				Me.OnTableNoteChanged
			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.SQLClass")>  _
Partial Public Class SQLClass
	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.SQLUrl")>  _
Partial Public Class SQLUrl
	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 _SQLID As Integer
	
	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 OnSQLIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnSQLIDChanged()
    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:="_SQLID", DbType:="Int NOT NULL")>  _
	Public Property SQLID() As Integer
		Get
			Return Me._SQLID
		End Get
		Set
			If ((Me._SQLID = value)  _
						= false) Then
				Me.OnSQLIDChanging(value)
				Me.SendPropertyChanging
				Me._SQLID = value
				Me.SendPropertyChanged("SQLID")
				Me.OnSQLIDChanged
			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

<Table(Name:="dbo.SQLTemplate")>  _
Partial Public Class SQLTemplate
	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 _SQLName As String
	
	Private _SQLContent 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 OnSQLNameChanging(value As String)
    End Sub
    Partial Private Sub OnSQLNameChanged()
    End Sub
    Partial Private Sub OnSQLContentChanging(value As String)
    End Sub
    Partial Private Sub OnSQLContentChanged()
    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:="_SQLName", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property SQLName() As String
		Get
			Return Me._SQLName
		End Get
		Set
			If (String.Equals(Me._SQLName, value) = false) Then
				Me.OnSQLNameChanging(value)
				Me.SendPropertyChanging
				Me._SQLName = value
				Me.SendPropertyChanged("SQLName")
				Me.OnSQLNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_SQLContent", DbType:="NVarChar(2000) NOT NULL", CanBeNull:=false)>  _
	Public Property SQLContent() As String
		Get
			Return Me._SQLContent
		End Get
		Set
			If (String.Equals(Me._SQLContent, value) = false) Then
				Me.OnSQLContentChanging(value)
				Me.SendPropertyChanging
				Me._SQLContent = value
				Me.SendPropertyChanged("SQLContent")
				Me.OnSQLContentChanged
			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.TableFields")>  _
Partial Public Class TableFields
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _TableName As String
	
	Private _FieldName As String
	
	Private _FieldNote As String
	
	Private _IsPrimaryKey As System.Nullable(Of Boolean)
	
    #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 OnTableNameChanging(value As String)
    End Sub
    Partial Private Sub OnTableNameChanged()
    End Sub
    Partial Private Sub OnFieldNameChanging(value As String)
    End Sub
    Partial Private Sub OnFieldNameChanged()
    End Sub
    Partial Private Sub OnFieldNoteChanging(value As String)
    End Sub
    Partial Private Sub OnFieldNoteChanged()
    End Sub
    Partial Private Sub OnIsPrimaryKeyChanging(value As System.Nullable(Of Boolean))
    End Sub
    Partial Private Sub OnIsPrimaryKeyChanged()
    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:="_TableName", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property TableName() As String
		Get
			Return Me._TableName
		End Get
		Set
			If (String.Equals(Me._TableName, value) = false) Then
				Me.OnTableNameChanging(value)
				Me.SendPropertyChanging
				Me._TableName = value
				Me.SendPropertyChanged("TableName")
				Me.OnTableNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_FieldName", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property FieldName() As String
		Get
			Return Me._FieldName
		End Get
		Set
			If (String.Equals(Me._FieldName, value) = false) Then
				Me.OnFieldNameChanging(value)
				Me.SendPropertyChanging
				Me._FieldName = value
				Me.SendPropertyChanged("FieldName")
				Me.OnFieldNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_FieldNote", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property FieldNote() As String
		Get
			Return Me._FieldNote
		End Get
		Set
			If (String.Equals(Me._FieldNote, value) = false) Then
				Me.OnFieldNoteChanging(value)
				Me.SendPropertyChanging
				Me._FieldNote = value
				Me.SendPropertyChanged("FieldNote")
				Me.OnFieldNoteChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_IsPrimaryKey", DbType:="Bit")>  _
	Public Property IsPrimaryKey() As System.Nullable(Of Boolean)
		Get
			Return Me._IsPrimaryKey
		End Get
		Set
			If (Me._IsPrimaryKey.Equals(value) = false) Then
				Me.OnIsPrimaryKeyChanging(value)
				Me.SendPropertyChanging
				Me._IsPrimaryKey = value
				Me.SendPropertyChanged("IsPrimaryKey")
				Me.OnIsPrimaryKeyChanged
			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.SQLDesign")>  _
Partial Public Class SQLDesign
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _SQLID As Integer
	
	Private _hfWhere As String
	
	Private _hfOrderBY As String
	
	Private _hfSelectFields As String
	
	Private _hfTableJson As String
	
	Private _hfHTMLMain As String
	
	Private _hfHTMLWhere As String
	
	Private _hfHTMLOrder As String
	
	Private _hfInner As String
	
	Private _hfHTMLInner 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 OnSQLIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnSQLIDChanged()
    End Sub
    Partial Private Sub OnhfWhereChanging(value As String)
    End Sub
    Partial Private Sub OnhfWhereChanged()
    End Sub
    Partial Private Sub OnhfOrderBYChanging(value As String)
    End Sub
    Partial Private Sub OnhfOrderBYChanged()
    End Sub
    Partial Private Sub OnhfSelectFieldsChanging(value As String)
    End Sub
    Partial Private Sub OnhfSelectFieldsChanged()
    End Sub
    Partial Private Sub OnhfTableJsonChanging(value As String)
    End Sub
    Partial Private Sub OnhfTableJsonChanged()
    End Sub
    Partial Private Sub OnhfHTMLMainChanging(value As String)
    End Sub
    Partial Private Sub OnhfHTMLMainChanged()
    End Sub
    Partial Private Sub OnhfHTMLWhereChanging(value As String)
    End Sub
    Partial Private Sub OnhfHTMLWhereChanged()
    End Sub
    Partial Private Sub OnhfHTMLOrderChanging(value As String)
    End Sub
    Partial Private Sub OnhfHTMLOrderChanged()
    End Sub
    Partial Private Sub OnhfInnerChanging(value As String)
    End Sub
    Partial Private Sub OnhfInnerChanged()
    End Sub
    Partial Private Sub OnhfHTMLInnerChanging(value As String)
    End Sub
    Partial Private Sub OnhfHTMLInnerChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		OnCreated
	End Sub
	
	<Column(Storage:="_SQLID", DbType:="Int NOT NULL", IsPrimaryKey:=true)>  _
	Public Property SQLID() As Integer
		Get
			Return Me._SQLID
		End Get
		Set
			If ((Me._SQLID = value)  _
						= false) Then
				Me.OnSQLIDChanging(value)
				Me.SendPropertyChanging
				Me._SQLID = value
				Me.SendPropertyChanged("SQLID")
				Me.OnSQLIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_hfWhere", DbType:="NVarChar(MAX)")>  _
	Public Property hfWhere() As String
		Get
			Return Me._hfWhere
		End Get
		Set
			If (String.Equals(Me._hfWhere, value) = false) Then
				Me.OnhfWhereChanging(value)
				Me.SendPropertyChanging
				Me._hfWhere = value
				Me.SendPropertyChanged("hfWhere")
				Me.OnhfWhereChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_hfOrderBY", DbType:="NVarChar(MAX)")>  _
	Public Property hfOrderBY() As String
		Get
			Return Me._hfOrderBY
		End Get
		Set
			If (String.Equals(Me._hfOrderBY, value) = false) Then
				Me.OnhfOrderBYChanging(value)
				Me.SendPropertyChanging
				Me._hfOrderBY = value
				Me.SendPropertyChanged("hfOrderBY")
				Me.OnhfOrderBYChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_hfSelectFields", DbType:="NVarChar(MAX)")>  _
	Public Property hfSelectFields() As String
		Get
			Return Me._hfSelectFields
		End Get
		Set
			If (String.Equals(Me._hfSelectFields, value) = false) Then
				Me.OnhfSelectFieldsChanging(value)
				Me.SendPropertyChanging
				Me._hfSelectFields = value
				Me.SendPropertyChanged("hfSelectFields")
				Me.OnhfSelectFieldsChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_hfTableJson", DbType:="NVarChar(MAX)")>  _
	Public Property hfTableJson() As String
		Get
			Return Me._hfTableJson
		End Get
		Set
			If (String.Equals(Me._hfTableJson, value) = false) Then
				Me.OnhfTableJsonChanging(value)
				Me.SendPropertyChanging
				Me._hfTableJson = value
				Me.SendPropertyChanged("hfTableJson")
				Me.OnhfTableJsonChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_hfHTMLMain", DbType:="NVarChar(MAX)")>  _
	Public Property hfHTMLMain() As String
		Get
			Return Me._hfHTMLMain
		End Get
		Set
			If (String.Equals(Me._hfHTMLMain, value) = false) Then
				Me.OnhfHTMLMainChanging(value)
				Me.SendPropertyChanging
				Me._hfHTMLMain = value
				Me.SendPropertyChanged("hfHTMLMain")
				Me.OnhfHTMLMainChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_hfHTMLWhere", DbType:="NVarChar(MAX)")>  _
	Public Property hfHTMLWhere() As String
		Get
			Return Me._hfHTMLWhere
		End Get
		Set
			If (String.Equals(Me._hfHTMLWhere, value) = false) Then
				Me.OnhfHTMLWhereChanging(value)
				Me.SendPropertyChanging
				Me._hfHTMLWhere = value
				Me.SendPropertyChanged("hfHTMLWhere")
				Me.OnhfHTMLWhereChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_hfHTMLOrder", DbType:="NVarChar(MAX)")>  _
	Public Property hfHTMLOrder() As String
		Get
			Return Me._hfHTMLOrder
		End Get
		Set
			If (String.Equals(Me._hfHTMLOrder, value) = false) Then
				Me.OnhfHTMLOrderChanging(value)
				Me.SendPropertyChanging
				Me._hfHTMLOrder = value
				Me.SendPropertyChanged("hfHTMLOrder")
				Me.OnhfHTMLOrderChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_hfInner", DbType:="NVarChar(MAX)")>  _
	Public Property hfInner() As String
		Get
			Return Me._hfInner
		End Get
		Set
			If (String.Equals(Me._hfInner, value) = false) Then
				Me.OnhfInnerChanging(value)
				Me.SendPropertyChanging
				Me._hfInner = value
				Me.SendPropertyChanged("hfInner")
				Me.OnhfInnerChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_hfHTMLInner", DbType:="NVarChar(MAX)")>  _
	Public Property hfHTMLInner() As String
		Get
			Return Me._hfHTMLInner
		End Get
		Set
			If (String.Equals(Me._hfHTMLInner, value) = false) Then
				Me.OnhfHTMLInnerChanging(value)
				Me.SendPropertyChanging
				Me._hfHTMLInner = value
				Me.SendPropertyChanged("hfHTMLInner")
				Me.OnhfHTMLInnerChanged
			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.SQLData")>  _
Partial Public Class SQLData
	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 _ClassID As Integer
	
	Private _SQLName As String
	
	Private _SQLType As Integer
	
	Private _SQLData As String
	
	Private _CountSQL As String
	
	Private _CacheLifeType As System.Nullable(Of Integer)
	
	Private _DependOf 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 OnClassIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnClassIDChanged()
    End Sub
    Partial Private Sub OnSQLNameChanging(value As String)
    End Sub
    Partial Private Sub OnSQLNameChanged()
    End Sub
    Partial Private Sub OnSQLTypeChanging(value As Integer)
    End Sub
    Partial Private Sub OnSQLTypeChanged()
    End Sub
    Partial Private Sub OnSQLDataChanging(value As String)
    End Sub
    Partial Private Sub OnSQLDataChanged()
    End Sub
    Partial Private Sub OnCountSQLChanging(value As String)
    End Sub
    Partial Private Sub OnCountSQLChanged()
    End Sub
    Partial Private Sub OnCacheLifeTypeChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnCacheLifeTypeChanged()
    End Sub
    Partial Private Sub OnDependOfChanging(value As String)
    End Sub
    Partial Private Sub OnDependOfChanged()
    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:="_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:="_SQLName", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property SQLName() As String
		Get
			Return Me._SQLName
		End Get
		Set
			If (String.Equals(Me._SQLName, value) = false) Then
				Me.OnSQLNameChanging(value)
				Me.SendPropertyChanging
				Me._SQLName = value
				Me.SendPropertyChanged("SQLName")
				Me.OnSQLNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_SQLType", DbType:="Int NOT NULL")>  _
	Public Property SQLType() As Integer
		Get
			Return Me._SQLType
		End Get
		Set
			If ((Me._SQLType = value)  _
						= false) Then
				Me.OnSQLTypeChanging(value)
				Me.SendPropertyChanging
				Me._SQLType = value
				Me.SendPropertyChanged("SQLType")
				Me.OnSQLTypeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_SQLData", DbType:="NVarChar(MAX) NOT NULL", CanBeNull:=false)>  _
	Public Property SQLData() As String
		Get
			Return Me._SQLData
		End Get
		Set
			If (String.Equals(Me._SQLData, value) = false) Then
				Me.OnSQLDataChanging(value)
				Me.SendPropertyChanging
				Me._SQLData = value
				Me.SendPropertyChanged("SQLData")
				Me.OnSQLDataChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CountSQL", DbType:="NVarChar(MAX) NOT NULL", CanBeNull:=false)>  _
	Public Property CountSQL() As String
		Get
			Return Me._CountSQL
		End Get
		Set
			If (String.Equals(Me._CountSQL, value) = false) Then
				Me.OnCountSQLChanging(value)
				Me.SendPropertyChanging
				Me._CountSQL = value
				Me.SendPropertyChanged("CountSQL")
				Me.OnCountSQLChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CacheLifeType", DbType:="Int")>  _
	Public Property CacheLifeType() As System.Nullable(Of Integer)
		Get
			Return Me._CacheLifeType
		End Get
		Set
			If (Me._CacheLifeType.Equals(value) = false) Then
				Me.OnCacheLifeTypeChanging(value)
				Me.SendPropertyChanging
				Me._CacheLifeType = value
				Me.SendPropertyChanged("CacheLifeType")
				Me.OnCacheLifeTypeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_DependOf", DbType:="NVarChar(200)")>  _
	Public Property DependOf() As String
		Get
			Return Me._DependOf
		End Get
		Set
			If (String.Equals(Me._DependOf, value) = false) Then
				Me.OnDependOfChanging(value)
				Me.SendPropertyChanging
				Me._DependOf = value
				Me.SendPropertyChanged("DependOf")
				Me.OnDependOfChanged
			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
