'------------------------------------------------------------------------------
' <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_AdvDataContext
	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 InsertAdv(instance As Adv)
    End Sub
  Partial Private Sub UpdateAdv(instance As Adv)
    End Sub
  Partial Private Sub DeleteAdv(instance As Adv)
    End Sub
  Partial Private Sub InsertAdvClass(instance As AdvClass)
    End Sub
  Partial Private Sub UpdateAdvClass(instance As AdvClass)
    End Sub
  Partial Private Sub DeleteAdvClass(instance As AdvClass)
    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 Adv() As System.Data.Linq.Table(Of Adv)
		Get
			Return Me.GetTable(Of Adv)
		End Get
	End Property
	
	Public ReadOnly Property AdvClass() As System.Data.Linq.Table(Of AdvClass)
		Get
			Return Me.GetTable(Of AdvClass)
		End Get
	End Property
End Class

<Table(Name:="dbo.Adv")>  _
Partial Public Class Adv
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _Name As String
	
	Private _Url As String
	
	Private _Pic As String
	
	Private _ClassID As Integer
	
	Private _OrderID As Integer
	
	Private _SiteID As Integer
	
    #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 OnNameChanging(value As String)
    End Sub
    Partial Private Sub OnNameChanged()
    End Sub
    Partial Private Sub OnUrlChanging(value As String)
    End Sub
    Partial Private Sub OnUrlChanged()
    End Sub
    Partial Private Sub OnPicChanging(value As String)
    End Sub
    Partial Private Sub OnPicChanged()
    End Sub
    Partial Private Sub OnClassIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnClassIDChanged()
    End Sub
    Partial Private Sub OnOrderIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnOrderIDChanged()
    End Sub
    Partial Private Sub OnSiteIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnSiteIDChanged()
    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:="_Name", DbType:="NVarChar(20) 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:="_Url", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property Url() As String
		Get
			Return Me._Url
		End Get
		Set
			If (String.Equals(Me._Url, value) = false) Then
				Me.OnUrlChanging(value)
				Me.SendPropertyChanging
				Me._Url = value
				Me.SendPropertyChanged("Url")
				Me.OnUrlChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Pic", DbType:="NVarChar(400)")>  _
	Public Property Pic() As String
		Get
			Return Me._Pic
		End Get
		Set
			If (String.Equals(Me._Pic, value) = false) Then
				Me.OnPicChanging(value)
				Me.SendPropertyChanging
				Me._Pic = value
				Me.SendPropertyChanged("Pic")
				Me.OnPicChanged
			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:="_OrderID", DbType:="Int NOT NULL")>  _
	Public Property OrderID() As Integer
		Get
			Return Me._OrderID
		End Get
		Set
			If ((Me._OrderID = value)  _
						= false) Then
				Me.OnOrderIDChanging(value)
				Me.SendPropertyChanging
				Me._OrderID = value
				Me.SendPropertyChanged("OrderID")
				Me.OnOrderIDChanged
			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
	
	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.AdvClass")>  _
Partial Public Class AdvClass
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _ClassName As String
	
	Private _SiteID As Integer
	
    #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 OnClassNameChanging(value As String)
    End Sub
    Partial Private Sub OnClassNameChanged()
    End Sub
    Partial Private Sub OnSiteIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnSiteIDChanged()
    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:="_ClassName", DbType:="NVarChar(20) 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
	
	<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
	
	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
