'------------------------------------------------------------------------------
' <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_HouseDataContext
	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 InsertHouseClass(instance As HouseClass)
    End Sub
  Partial Private Sub UpdateHouseClass(instance As HouseClass)
    End Sub
  Partial Private Sub DeleteHouseClass(instance As HouseClass)
    End Sub
  Partial Private Sub InsertHouseInfo(instance As HouseInfo)
    End Sub
  Partial Private Sub UpdateHouseInfo(instance As HouseInfo)
    End Sub
  Partial Private Sub DeleteHouseInfo(instance As HouseInfo)
    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 HouseClass() As System.Data.Linq.Table(Of HouseClass)
		Get
			Return Me.GetTable(Of HouseClass)
		End Get
	End Property
	
	Public ReadOnly Property HouseInfo() As System.Data.Linq.Table(Of HouseInfo)
		Get
			Return Me.GetTable(Of HouseInfo)
		End Get
	End Property
End Class

<Table(Name:="dbo.HouseClass")>  _
Partial Public Class HouseClass
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ClassID As Integer
	
	Private _SiteID As System.Nullable(Of Integer)
	
	Private _ClassName As String
	
	Private _TopID As System.Nullable(Of Integer)
	
	Private _ParentID As System.Nullable(Of Integer)
	
	Private _ClassLev As System.Nullable(Of Integer)
	
	Private _ChildCount As System.Nullable(Of Integer)
	
	Private _OrderID As System.Nullable(Of Integer)
	
	Private _Flag 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 OnClassIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnClassIDChanged()
    End Sub
    Partial Private Sub OnSiteIDChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnSiteIDChanged()
    End Sub
    Partial Private Sub OnClassNameChanging(value As String)
    End Sub
    Partial Private Sub OnClassNameChanged()
    End Sub
    Partial Private Sub OnTopIDChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnTopIDChanged()
    End Sub
    Partial Private Sub OnParentIDChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnParentIDChanged()
    End Sub
    Partial Private Sub OnClassLevChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnClassLevChanged()
    End Sub
    Partial Private Sub OnChildCountChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnChildCountChanged()
    End Sub
    Partial Private Sub OnOrderIDChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnOrderIDChanged()
    End Sub
    Partial Private Sub OnFlagChanging(value As String)
    End Sub
    Partial Private Sub OnFlagChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		OnCreated
	End Sub
	
	<Column(Storage:="_ClassID", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)>  _
	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:="_SiteID", DbType:="Int")>  _
	Public Property SiteID() As System.Nullable(Of Integer)
		Get
			Return Me._SiteID
		End Get
		Set
			If (Me._SiteID.Equals(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(30) 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:="_TopID", DbType:="Int")>  _
	Public Property TopID() As System.Nullable(Of Integer)
		Get
			Return Me._TopID
		End Get
		Set
			If (Me._TopID.Equals(value) = false) Then
				Me.OnTopIDChanging(value)
				Me.SendPropertyChanging
				Me._TopID = value
				Me.SendPropertyChanged("TopID")
				Me.OnTopIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ParentID", DbType:="Int")>  _
	Public Property ParentID() As System.Nullable(Of Integer)
		Get
			Return Me._ParentID
		End Get
		Set
			If (Me._ParentID.Equals(value) = false) Then
				Me.OnParentIDChanging(value)
				Me.SendPropertyChanging
				Me._ParentID = value
				Me.SendPropertyChanged("ParentID")
				Me.OnParentIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ClassLev", DbType:="Int")>  _
	Public Property ClassLev() As System.Nullable(Of Integer)
		Get
			Return Me._ClassLev
		End Get
		Set
			If (Me._ClassLev.Equals(value) = false) Then
				Me.OnClassLevChanging(value)
				Me.SendPropertyChanging
				Me._ClassLev = value
				Me.SendPropertyChanged("ClassLev")
				Me.OnClassLevChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ChildCount", DbType:="Int")>  _
	Public Property ChildCount() As System.Nullable(Of Integer)
		Get
			Return Me._ChildCount
		End Get
		Set
			If (Me._ChildCount.Equals(value) = false) Then
				Me.OnChildCountChanging(value)
				Me.SendPropertyChanging
				Me._ChildCount = value
				Me.SendPropertyChanged("ChildCount")
				Me.OnChildCountChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_OrderID", DbType:="Int")>  _
	Public Property OrderID() As System.Nullable(Of Integer)
		Get
			Return Me._OrderID
		End Get
		Set
			If (Me._OrderID.Equals(value) = false) Then
				Me.OnOrderIDChanging(value)
				Me.SendPropertyChanging
				Me._OrderID = value
				Me.SendPropertyChanged("OrderID")
				Me.OnOrderIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Flag", DbType:="NVarChar(50)")>  _
	Public Property Flag() As String
		Get
			Return Me._Flag
		End Get
		Set
			If (String.Equals(Me._Flag, value) = false) Then
				Me.OnFlagChanging(value)
				Me.SendPropertyChanging
				Me._Flag = value
				Me.SendPropertyChanged("Flag")
				Me.OnFlagChanged
			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.HouseInfo")>  _
Partial Public Class HouseInfo
	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 _Title As String
	
	Private _HousePosition As String
	
	Private _Area As System.Nullable(Of Decimal)
	
	Private _Orientation As String
	
	Private _HousePics As String
	
	Private _TrafficSigns As String
	
	Private _Note As String
	
	Private _Prices As System.Nullable(Of Integer)
	
	Private _IsTop As System.Nullable(Of Boolean)
	
	Private _HouseType 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 OnTitleChanging(value As String)
    End Sub
    Partial Private Sub OnTitleChanged()
    End Sub
    Partial Private Sub OnHousePositionChanging(value As String)
    End Sub
    Partial Private Sub OnHousePositionChanged()
    End Sub
    Partial Private Sub OnAreaChanging(value As System.Nullable(Of Decimal))
    End Sub
    Partial Private Sub OnAreaChanged()
    End Sub
    Partial Private Sub OnOrientationChanging(value As String)
    End Sub
    Partial Private Sub OnOrientationChanged()
    End Sub
    Partial Private Sub OnHousePicsChanging(value As String)
    End Sub
    Partial Private Sub OnHousePicsChanged()
    End Sub
    Partial Private Sub OnTrafficSignsChanging(value As String)
    End Sub
    Partial Private Sub OnTrafficSignsChanged()
    End Sub
    Partial Private Sub OnNoteChanging(value As String)
    End Sub
    Partial Private Sub OnNoteChanged()
    End Sub
    Partial Private Sub OnPricesChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnPricesChanged()
    End Sub
    Partial Private Sub OnIsTopChanging(value As System.Nullable(Of Boolean))
    End Sub
    Partial Private Sub OnIsTopChanged()
    End Sub
    Partial Private Sub OnHouseTypeChanging(value As String)
    End Sub
    Partial Private Sub OnHouseTypeChanged()
    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:="_Title", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property Title() As String
		Get
			Return Me._Title
		End Get
		Set
			If (String.Equals(Me._Title, value) = false) Then
				Me.OnTitleChanging(value)
				Me.SendPropertyChanging
				Me._Title = value
				Me.SendPropertyChanged("Title")
				Me.OnTitleChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_HousePosition", DbType:="NVarChar(100)")>  _
	Public Property HousePosition() As String
		Get
			Return Me._HousePosition
		End Get
		Set
			If (String.Equals(Me._HousePosition, value) = false) Then
				Me.OnHousePositionChanging(value)
				Me.SendPropertyChanging
				Me._HousePosition = value
				Me.SendPropertyChanged("HousePosition")
				Me.OnHousePositionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Area", DbType:="Decimal(8,2)")>  _
	Public Property Area() As System.Nullable(Of Decimal)
		Get
			Return Me._Area
		End Get
		Set
			If (Me._Area.Equals(value) = false) Then
				Me.OnAreaChanging(value)
				Me.SendPropertyChanging
				Me._Area = value
				Me.SendPropertyChanged("Area")
				Me.OnAreaChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Orientation", DbType:="NVarChar(20)")>  _
	Public Property Orientation() As String
		Get
			Return Me._Orientation
		End Get
		Set
			If (String.Equals(Me._Orientation, value) = false) Then
				Me.OnOrientationChanging(value)
				Me.SendPropertyChanging
				Me._Orientation = value
				Me.SendPropertyChanged("Orientation")
				Me.OnOrientationChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_HousePics", DbType:="NVarChar(100)")>  _
	Public Property HousePics() As String
		Get
			Return Me._HousePics
		End Get
		Set
			If (String.Equals(Me._HousePics, value) = false) Then
				Me.OnHousePicsChanging(value)
				Me.SendPropertyChanging
				Me._HousePics = value
				Me.SendPropertyChanged("HousePics")
				Me.OnHousePicsChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_TrafficSigns", DbType:="NVarChar(200)")>  _
	Public Property TrafficSigns() As String
		Get
			Return Me._TrafficSigns
		End Get
		Set
			If (String.Equals(Me._TrafficSigns, value) = false) Then
				Me.OnTrafficSignsChanging(value)
				Me.SendPropertyChanging
				Me._TrafficSigns = value
				Me.SendPropertyChanged("TrafficSigns")
				Me.OnTrafficSignsChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Note", DbType:="NVarChar(800)")>  _
	Public Property Note() As String
		Get
			Return Me._Note
		End Get
		Set
			If (String.Equals(Me._Note, value) = false) Then
				Me.OnNoteChanging(value)
				Me.SendPropertyChanging
				Me._Note = value
				Me.SendPropertyChanged("Note")
				Me.OnNoteChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Prices", DbType:="Int")>  _
	Public Property Prices() As System.Nullable(Of Integer)
		Get
			Return Me._Prices
		End Get
		Set
			If (Me._Prices.Equals(value) = false) Then
				Me.OnPricesChanging(value)
				Me.SendPropertyChanging
				Me._Prices = value
				Me.SendPropertyChanged("Prices")
				Me.OnPricesChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_IsTop", DbType:="Bit")>  _
	Public Property IsTop() As System.Nullable(Of Boolean)
		Get
			Return Me._IsTop
		End Get
		Set
			If (Me._IsTop.Equals(value) = false) Then
				Me.OnIsTopChanging(value)
				Me.SendPropertyChanging
				Me._IsTop = value
				Me.SendPropertyChanged("IsTop")
				Me.OnIsTopChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_HouseType", DbType:="NVarChar(20)")>  _
	Public Property HouseType() As String
		Get
			Return Me._HouseType
		End Get
		Set
			If (String.Equals(Me._HouseType, value) = false) Then
				Me.OnHouseTypeChanging(value)
				Me.SendPropertyChanging
				Me._HouseType = value
				Me.SendPropertyChanged("HouseType")
				Me.OnHouseTypeChanged
			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
