'------------------------------------------------------------------------------
' <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_UserDataContext
	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 InsertXrenUser(instance As XrenUser)
    End Sub
  Partial Private Sub UpdateXrenUser(instance As XrenUser)
    End Sub
  Partial Private Sub DeleteXrenUser(instance As XrenUser)
    End Sub
  Partial Private Sub InsertUserGroup(instance As UserGroup)
    End Sub
  Partial Private Sub UpdateUserGroup(instance As UserGroup)
    End Sub
  Partial Private Sub DeleteUserGroup(instance As UserGroup)
    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 XrenUser() As System.Data.Linq.Table(Of XrenUser)
		Get
			Return Me.GetTable(Of XrenUser)
		End Get
	End Property
	
	Public ReadOnly Property UserGroup() As System.Data.Linq.Table(Of UserGroup)
		Get
			Return Me.GetTable(Of UserGroup)
		End Get
	End Property
End Class

<Table(Name:="dbo.XrenUser")>  _
Partial Public Class XrenUser
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _SiteID As System.Nullable(Of Integer)
	
	Private _GroupID As Integer
	
	Private _IsManager As Boolean
	
	Private _UserName As String
	
	Private _PassWord As String
	
	Private _Email As String
	
	Private _Sex As Boolean
	
	Private _HeadPhoto As String
	
	Private _Point As System.Nullable(Of Integer)
	
	Private _Question As String
	
	Private _Answer As String
	
	Private _Locked As System.Nullable(Of Boolean)
	
	Private _UserSignature As String
	
	Private _UserCardID As String
	
	Private _CellPhone As String
	
	Private _IsVerification As System.Nullable(Of Boolean)
	
	Private _LastLoginIP As String
	
	Private _LastLoginTime As System.Nullable(Of Date)
	
	Private _LoginTimes As System.Nullable(Of Integer)
	
	Private _SignInTime As System.Nullable(Of Date)
	
	Private _SignInTimes As System.Nullable(Of 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 OnSiteIDChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnSiteIDChanged()
    End Sub
    Partial Private Sub OnGroupIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnGroupIDChanged()
    End Sub
    Partial Private Sub OnIsManagerChanging(value As Boolean)
    End Sub
    Partial Private Sub OnIsManagerChanged()
    End Sub
    Partial Private Sub OnUserNameChanging(value As String)
    End Sub
    Partial Private Sub OnUserNameChanged()
    End Sub
    Partial Private Sub OnPassWordChanging(value As String)
    End Sub
    Partial Private Sub OnPassWordChanged()
    End Sub
    Partial Private Sub OnEmailChanging(value As String)
    End Sub
    Partial Private Sub OnEmailChanged()
    End Sub
    Partial Private Sub OnSexChanging(value As Boolean)
    End Sub
    Partial Private Sub OnSexChanged()
    End Sub
    Partial Private Sub OnHeadPhotoChanging(value As String)
    End Sub
    Partial Private Sub OnHeadPhotoChanged()
    End Sub
    Partial Private Sub OnPointChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnPointChanged()
    End Sub
    Partial Private Sub OnQuestionChanging(value As String)
    End Sub
    Partial Private Sub OnQuestionChanged()
    End Sub
    Partial Private Sub OnAnswerChanging(value As String)
    End Sub
    Partial Private Sub OnAnswerChanged()
    End Sub
    Partial Private Sub OnLockedChanging(value As System.Nullable(Of Boolean))
    End Sub
    Partial Private Sub OnLockedChanged()
    End Sub
    Partial Private Sub OnUserSignatureChanging(value As String)
    End Sub
    Partial Private Sub OnUserSignatureChanged()
    End Sub
    Partial Private Sub OnUserCardIDChanging(value As String)
    End Sub
    Partial Private Sub OnUserCardIDChanged()
    End Sub
    Partial Private Sub OnCellPhoneChanging(value As String)
    End Sub
    Partial Private Sub OnCellPhoneChanged()
    End Sub
    Partial Private Sub OnIsVerificationChanging(value As System.Nullable(Of Boolean))
    End Sub
    Partial Private Sub OnIsVerificationChanged()
    End Sub
    Partial Private Sub OnLastLoginIPChanging(value As String)
    End Sub
    Partial Private Sub OnLastLoginIPChanged()
    End Sub
    Partial Private Sub OnLastLoginTimeChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnLastLoginTimeChanged()
    End Sub
    Partial Private Sub OnLoginTimesChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnLoginTimesChanged()
    End Sub
    Partial Private Sub OnSignInTimeChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnSignInTimeChanged()
    End Sub
    Partial Private Sub OnSignInTimesChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnSignInTimesChanged()
    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")>  _
	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:="_GroupID", DbType:="Int NOT NULL")>  _
	Public Property GroupID() As Integer
		Get
			Return Me._GroupID
		End Get
		Set
			If ((Me._GroupID = value)  _
						= false) Then
				Me.OnGroupIDChanging(value)
				Me.SendPropertyChanging
				Me._GroupID = value
				Me.SendPropertyChanged("GroupID")
				Me.OnGroupIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_IsManager", DbType:="Bit NOT NULL")>  _
	Public Property IsManager() As Boolean
		Get
			Return Me._IsManager
		End Get
		Set
			If ((Me._IsManager = value)  _
						= false) Then
				Me.OnIsManagerChanging(value)
				Me.SendPropertyChanging
				Me._IsManager = value
				Me.SendPropertyChanged("IsManager")
				Me.OnIsManagerChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_UserName", DbType:="NVarChar(16) NOT NULL", CanBeNull:=false)>  _
	Public Property UserName() As String
		Get
			Return Me._UserName
		End Get
		Set
			If (String.Equals(Me._UserName, value) = false) Then
				Me.OnUserNameChanging(value)
				Me.SendPropertyChanging
				Me._UserName = value
				Me.SendPropertyChanged("UserName")
				Me.OnUserNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_PassWord", DbType:="NVarChar(20) NOT NULL", CanBeNull:=false)>  _
	Public Property PassWord() As String
		Get
			Return Me._PassWord
		End Get
		Set
			If (String.Equals(Me._PassWord, value) = false) Then
				Me.OnPassWordChanging(value)
				Me.SendPropertyChanging
				Me._PassWord = value
				Me.SendPropertyChanged("PassWord")
				Me.OnPassWordChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Email", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property Email() As String
		Get
			Return Me._Email
		End Get
		Set
			If (String.Equals(Me._Email, value) = false) Then
				Me.OnEmailChanging(value)
				Me.SendPropertyChanging
				Me._Email = value
				Me.SendPropertyChanged("Email")
				Me.OnEmailChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Sex", DbType:="Bit NOT NULL")>  _
	Public Property Sex() As Boolean
		Get
			Return Me._Sex
		End Get
		Set
			If ((Me._Sex = value)  _
						= false) Then
				Me.OnSexChanging(value)
				Me.SendPropertyChanging
				Me._Sex = value
				Me.SendPropertyChanged("Sex")
				Me.OnSexChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_HeadPhoto", DbType:="NVarChar(20)")>  _
	Public Property HeadPhoto() As String
		Get
			Return Me._HeadPhoto
		End Get
		Set
			If (String.Equals(Me._HeadPhoto, value) = false) Then
				Me.OnHeadPhotoChanging(value)
				Me.SendPropertyChanging
				Me._HeadPhoto = value
				Me.SendPropertyChanged("HeadPhoto")
				Me.OnHeadPhotoChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Point", DbType:="Int")>  _
	Public Property Point() As System.Nullable(Of Integer)
		Get
			Return Me._Point
		End Get
		Set
			If (Me._Point.Equals(value) = false) Then
				Me.OnPointChanging(value)
				Me.SendPropertyChanging
				Me._Point = value
				Me.SendPropertyChanged("Point")
				Me.OnPointChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Question", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property Question() As String
		Get
			Return Me._Question
		End Get
		Set
			If (String.Equals(Me._Question, value) = false) Then
				Me.OnQuestionChanging(value)
				Me.SendPropertyChanging
				Me._Question = value
				Me.SendPropertyChanged("Question")
				Me.OnQuestionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Answer", DbType:="NVarChar(20) NOT NULL", CanBeNull:=false)>  _
	Public Property Answer() As String
		Get
			Return Me._Answer
		End Get
		Set
			If (String.Equals(Me._Answer, value) = false) Then
				Me.OnAnswerChanging(value)
				Me.SendPropertyChanging
				Me._Answer = value
				Me.SendPropertyChanged("Answer")
				Me.OnAnswerChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Locked", DbType:="Bit")>  _
	Public Property Locked() As System.Nullable(Of Boolean)
		Get
			Return Me._Locked
		End Get
		Set
			If (Me._Locked.Equals(value) = false) Then
				Me.OnLockedChanging(value)
				Me.SendPropertyChanging
				Me._Locked = value
				Me.SendPropertyChanged("Locked")
				Me.OnLockedChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_UserSignature", DbType:="NVarChar(200)")>  _
	Public Property UserSignature() As String
		Get
			Return Me._UserSignature
		End Get
		Set
			If (String.Equals(Me._UserSignature, value) = false) Then
				Me.OnUserSignatureChanging(value)
				Me.SendPropertyChanging
				Me._UserSignature = value
				Me.SendPropertyChanged("UserSignature")
				Me.OnUserSignatureChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_UserCardID", DbType:="NVarChar(18)")>  _
	Public Property UserCardID() As String
		Get
			Return Me._UserCardID
		End Get
		Set
			If (String.Equals(Me._UserCardID, value) = false) Then
				Me.OnUserCardIDChanging(value)
				Me.SendPropertyChanging
				Me._UserCardID = value
				Me.SendPropertyChanged("UserCardID")
				Me.OnUserCardIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CellPhone", DbType:="NVarChar(12)")>  _
	Public Property CellPhone() As String
		Get
			Return Me._CellPhone
		End Get
		Set
			If (String.Equals(Me._CellPhone, value) = false) Then
				Me.OnCellPhoneChanging(value)
				Me.SendPropertyChanging
				Me._CellPhone = value
				Me.SendPropertyChanged("CellPhone")
				Me.OnCellPhoneChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_IsVerification", DbType:="Bit")>  _
	Public Property IsVerification() As System.Nullable(Of Boolean)
		Get
			Return Me._IsVerification
		End Get
		Set
			If (Me._IsVerification.Equals(value) = false) Then
				Me.OnIsVerificationChanging(value)
				Me.SendPropertyChanging
				Me._IsVerification = value
				Me.SendPropertyChanged("IsVerification")
				Me.OnIsVerificationChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_LastLoginIP", DbType:="NVarChar(15)")>  _
	Public Property LastLoginIP() As String
		Get
			Return Me._LastLoginIP
		End Get
		Set
			If (String.Equals(Me._LastLoginIP, value) = false) Then
				Me.OnLastLoginIPChanging(value)
				Me.SendPropertyChanging
				Me._LastLoginIP = value
				Me.SendPropertyChanged("LastLoginIP")
				Me.OnLastLoginIPChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_LastLoginTime", DbType:="DateTime")>  _
	Public Property LastLoginTime() As System.Nullable(Of Date)
		Get
			Return Me._LastLoginTime
		End Get
		Set
			If (Me._LastLoginTime.Equals(value) = false) Then
				Me.OnLastLoginTimeChanging(value)
				Me.SendPropertyChanging
				Me._LastLoginTime = value
				Me.SendPropertyChanged("LastLoginTime")
				Me.OnLastLoginTimeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_LoginTimes", DbType:="Int")>  _
	Public Property LoginTimes() As System.Nullable(Of Integer)
		Get
			Return Me._LoginTimes
		End Get
		Set
			If (Me._LoginTimes.Equals(value) = false) Then
				Me.OnLoginTimesChanging(value)
				Me.SendPropertyChanging
				Me._LoginTimes = value
				Me.SendPropertyChanged("LoginTimes")
				Me.OnLoginTimesChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_SignInTime", DbType:="DateTime")>  _
	Public Property SignInTime() As System.Nullable(Of Date)
		Get
			Return Me._SignInTime
		End Get
		Set
			If (Me._SignInTime.Equals(value) = false) Then
				Me.OnSignInTimeChanging(value)
				Me.SendPropertyChanging
				Me._SignInTime = value
				Me.SendPropertyChanged("SignInTime")
				Me.OnSignInTimeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_SignInTimes", DbType:="Int")>  _
	Public Property SignInTimes() As System.Nullable(Of Integer)
		Get
			Return Me._SignInTimes
		End Get
		Set
			If (Me._SignInTimes.Equals(value) = false) Then
				Me.OnSignInTimesChanging(value)
				Me.SendPropertyChanging
				Me._SignInTimes = value
				Me.SendPropertyChanged("SignInTimes")
				Me.OnSignInTimesChanged
			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.UserGroup")>  _
Partial Public Class UserGroup
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _SiteID As System.Nullable(Of Integer)
	
	Private _GroupName As String
	
	Private _GroupIntro 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 System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnSiteIDChanged()
    End Sub
    Partial Private Sub OnGroupNameChanging(value As String)
    End Sub
    Partial Private Sub OnGroupNameChanged()
    End Sub
    Partial Private Sub OnGroupIntroChanging(value As String)
    End Sub
    Partial Private Sub OnGroupIntroChanged()
    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")>  _
	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:="_GroupName", DbType:="NVarChar(20) NOT NULL", CanBeNull:=false)>  _
	Public Property GroupName() As String
		Get
			Return Me._GroupName
		End Get
		Set
			If (String.Equals(Me._GroupName, value) = false) Then
				Me.OnGroupNameChanging(value)
				Me.SendPropertyChanging
				Me._GroupName = value
				Me.SendPropertyChanged("GroupName")
				Me.OnGroupNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_GroupIntro", DbType:="NVarChar(200) NOT NULL", CanBeNull:=false)>  _
	Public Property GroupIntro() As String
		Get
			Return Me._GroupIntro
		End Get
		Set
			If (String.Equals(Me._GroupIntro, value) = false) Then
				Me.OnGroupIntroChanging(value)
				Me.SendPropertyChanging
				Me._GroupIntro = value
				Me.SendPropertyChanged("GroupIntro")
				Me.OnGroupIntroChanged
			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
