'------------------------------------------------------------------------------
' <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_VoteDataContext
	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 InsertVote_Answer(instance As Vote_Answer)
    End Sub
  Partial Private Sub UpdateVote_Answer(instance As Vote_Answer)
    End Sub
  Partial Private Sub DeleteVote_Answer(instance As Vote_Answer)
    End Sub
  Partial Private Sub InsertVote_Detailed(instance As Vote_Detailed)
    End Sub
  Partial Private Sub UpdateVote_Detailed(instance As Vote_Detailed)
    End Sub
  Partial Private Sub DeleteVote_Detailed(instance As Vote_Detailed)
    End Sub
  Partial Private Sub InsertVote_Subject(instance As Vote_Subject)
    End Sub
  Partial Private Sub UpdateVote_Subject(instance As Vote_Subject)
    End Sub
  Partial Private Sub DeleteVote_Subject(instance As Vote_Subject)
    End Sub
  Partial Private Sub InsertVote_Question(instance As Vote_Question)
    End Sub
  Partial Private Sub UpdateVote_Question(instance As Vote_Question)
    End Sub
  Partial Private Sub DeleteVote_Question(instance As Vote_Question)
    End Sub
  Partial Private Sub InsertVote_Option(instance As Vote_Option)
    End Sub
  Partial Private Sub UpdateVote_Option(instance As Vote_Option)
    End Sub
  Partial Private Sub DeleteVote_Option(instance As Vote_Option)
    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 Vote_Answer() As System.Data.Linq.Table(Of Vote_Answer)
		Get
			Return Me.GetTable(Of Vote_Answer)
		End Get
	End Property
	
	Public ReadOnly Property Vote_Detailed() As System.Data.Linq.Table(Of Vote_Detailed)
		Get
			Return Me.GetTable(Of Vote_Detailed)
		End Get
	End Property
	
	Public ReadOnly Property Vote_Subject() As System.Data.Linq.Table(Of Vote_Subject)
		Get
			Return Me.GetTable(Of Vote_Subject)
		End Get
	End Property
	
	Public ReadOnly Property Vote_Question() As System.Data.Linq.Table(Of Vote_Question)
		Get
			Return Me.GetTable(Of Vote_Question)
		End Get
	End Property
	
	Public ReadOnly Property Vote_Option() As System.Data.Linq.Table(Of Vote_Option)
		Get
			Return Me.GetTable(Of Vote_Option)
		End Get
	End Property
End Class

<Table(Name:="dbo.Vote_Answer")>  _
Partial Public Class Vote_Answer
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _SubID As Integer
	
	Private _Addtime As Date
	
	Private _UserID As Integer
	
	Private _UserName As String
	
	Private _UserIP As String
	
	Private _SubmitTime As System.Nullable(Of Integer)
	
	Private _Integral As Integer
	
	Private _IsChecked 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 OnSubIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnSubIDChanged()
    End Sub
    Partial Private Sub OnAddtimeChanging(value As Date)
    End Sub
    Partial Private Sub OnAddtimeChanged()
    End Sub
    Partial Private Sub OnUserIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnUserIDChanged()
    End Sub
    Partial Private Sub OnUserNameChanging(value As String)
    End Sub
    Partial Private Sub OnUserNameChanged()
    End Sub
    Partial Private Sub OnUserIPChanging(value As String)
    End Sub
    Partial Private Sub OnUserIPChanged()
    End Sub
    Partial Private Sub OnSubmitTimeChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnSubmitTimeChanged()
    End Sub
    Partial Private Sub OnIntegralChanging(value As Integer)
    End Sub
    Partial Private Sub OnIntegralChanged()
    End Sub
    Partial Private Sub OnIsCheckedChanging(value As System.Nullable(Of Boolean))
    End Sub
    Partial Private Sub OnIsCheckedChanged()
    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:="_SubID", DbType:="Int NOT NULL")>  _
	Public Property SubID() As Integer
		Get
			Return Me._SubID
		End Get
		Set
			If ((Me._SubID = value)  _
						= false) Then
				Me.OnSubIDChanging(value)
				Me.SendPropertyChanging
				Me._SubID = value
				Me.SendPropertyChanged("SubID")
				Me.OnSubIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Addtime", DbType:="DateTime NOT NULL")>  _
	Public Property Addtime() As Date
		Get
			Return Me._Addtime
		End Get
		Set
			If ((Me._Addtime = value)  _
						= false) Then
				Me.OnAddtimeChanging(value)
				Me.SendPropertyChanging
				Me._Addtime = value
				Me.SendPropertyChanged("Addtime")
				Me.OnAddtimeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_UserID", DbType:="Int NOT NULL")>  _
	Public Property UserID() As Integer
		Get
			Return Me._UserID
		End Get
		Set
			If ((Me._UserID = value)  _
						= false) Then
				Me.OnUserIDChanging(value)
				Me.SendPropertyChanging
				Me._UserID = value
				Me.SendPropertyChanged("UserID")
				Me.OnUserIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_UserName", DbType:="VarChar(20) 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:="_UserIP", DbType:="NVarChar(15)")>  _
	Public Property UserIP() As String
		Get
			Return Me._UserIP
		End Get
		Set
			If (String.Equals(Me._UserIP, value) = false) Then
				Me.OnUserIPChanging(value)
				Me.SendPropertyChanging
				Me._UserIP = value
				Me.SendPropertyChanged("UserIP")
				Me.OnUserIPChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_SubmitTime", DbType:="Int")>  _
	Public Property SubmitTime() As System.Nullable(Of Integer)
		Get
			Return Me._SubmitTime
		End Get
		Set
			If (Me._SubmitTime.Equals(value) = false) Then
				Me.OnSubmitTimeChanging(value)
				Me.SendPropertyChanging
				Me._SubmitTime = value
				Me.SendPropertyChanged("SubmitTime")
				Me.OnSubmitTimeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Integral", DbType:="Int NOT NULL")>  _
	Public Property Integral() As Integer
		Get
			Return Me._Integral
		End Get
		Set
			If ((Me._Integral = value)  _
						= false) Then
				Me.OnIntegralChanging(value)
				Me.SendPropertyChanging
				Me._Integral = value
				Me.SendPropertyChanged("Integral")
				Me.OnIntegralChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_IsChecked", DbType:="Bit")>  _
	Public Property IsChecked() As System.Nullable(Of Boolean)
		Get
			Return Me._IsChecked
		End Get
		Set
			If (Me._IsChecked.Equals(value) = false) Then
				Me.OnIsCheckedChanging(value)
				Me.SendPropertyChanging
				Me._IsChecked = value
				Me.SendPropertyChanged("IsChecked")
				Me.OnIsCheckedChanged
			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.Vote_Detailed")>  _
Partial Public Class Vote_Detailed
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _AnsID As Integer
	
	Private _QuestionID As Integer
	
	Private _Answers 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 OnAnsIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnAnsIDChanged()
    End Sub
    Partial Private Sub OnQuestionIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnQuestionIDChanged()
    End Sub
    Partial Private Sub OnAnswersChanging(value As String)
    End Sub
    Partial Private Sub OnAnswersChanged()
    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:="_AnsID", DbType:="Int NOT NULL")>  _
	Public Property AnsID() As Integer
		Get
			Return Me._AnsID
		End Get
		Set
			If ((Me._AnsID = value)  _
						= false) Then
				Me.OnAnsIDChanging(value)
				Me.SendPropertyChanging
				Me._AnsID = value
				Me.SendPropertyChanged("AnsID")
				Me.OnAnsIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_QuestionID", DbType:="Int NOT NULL")>  _
	Public Property QuestionID() As Integer
		Get
			Return Me._QuestionID
		End Get
		Set
			If ((Me._QuestionID = value)  _
						= false) Then
				Me.OnQuestionIDChanging(value)
				Me.SendPropertyChanging
				Me._QuestionID = value
				Me.SendPropertyChanged("QuestionID")
				Me.OnQuestionIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Answers", DbType:="NText", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property Answers() As String
		Get
			Return Me._Answers
		End Get
		Set
			If (String.Equals(Me._Answers, value) = false) Then
				Me.OnAnswersChanging(value)
				Me.SendPropertyChanging
				Me._Answers = value
				Me.SendPropertyChanged("Answers")
				Me.OnAnswersChanged
			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.Vote_Subject")>  _
Partial Public Class Vote_Subject
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _Title As String
	
	Private _SubNote As String
	
	Private _SubPictrue As String
	
	Private _Addtime As System.Nullable(Of Date)
	
	Private _CreatUser As String
	
	Private _IsRepeat As Boolean
	
	Private _IsOpen As Boolean
	
	Private _TimeLimt As System.Nullable(Of Integer)
	
	Private _FailTime As System.Nullable(Of Date)
	
	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 OnTitleChanging(value As String)
    End Sub
    Partial Private Sub OnTitleChanged()
    End Sub
    Partial Private Sub OnSubNoteChanging(value As String)
    End Sub
    Partial Private Sub OnSubNoteChanged()
    End Sub
    Partial Private Sub OnSubPictrueChanging(value As String)
    End Sub
    Partial Private Sub OnSubPictrueChanged()
    End Sub
    Partial Private Sub OnAddtimeChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnAddtimeChanged()
    End Sub
    Partial Private Sub OnCreatUserChanging(value As String)
    End Sub
    Partial Private Sub OnCreatUserChanged()
    End Sub
    Partial Private Sub OnIsRepeatChanging(value As Boolean)
    End Sub
    Partial Private Sub OnIsRepeatChanged()
    End Sub
    Partial Private Sub OnIsOpenChanging(value As Boolean)
    End Sub
    Partial Private Sub OnIsOpenChanged()
    End Sub
    Partial Private Sub OnTimeLimtChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnTimeLimtChanged()
    End Sub
    Partial Private Sub OnFailTimeChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnFailTimeChanged()
    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:="_Title", DbType:="VarChar(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:="_SubNote", DbType:="NVarChar(400)")>  _
	Public Property SubNote() As String
		Get
			Return Me._SubNote
		End Get
		Set
			If (String.Equals(Me._SubNote, value) = false) Then
				Me.OnSubNoteChanging(value)
				Me.SendPropertyChanging
				Me._SubNote = value
				Me.SendPropertyChanged("SubNote")
				Me.OnSubNoteChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_SubPictrue", DbType:="VarChar(100)")>  _
	Public Property SubPictrue() As String
		Get
			Return Me._SubPictrue
		End Get
		Set
			If (String.Equals(Me._SubPictrue, value) = false) Then
				Me.OnSubPictrueChanging(value)
				Me.SendPropertyChanging
				Me._SubPictrue = value
				Me.SendPropertyChanged("SubPictrue")
				Me.OnSubPictrueChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Addtime", DbType:="DateTime")>  _
	Public Property Addtime() As System.Nullable(Of Date)
		Get
			Return Me._Addtime
		End Get
		Set
			If (Me._Addtime.Equals(value) = false) Then
				Me.OnAddtimeChanging(value)
				Me.SendPropertyChanging
				Me._Addtime = value
				Me.SendPropertyChanged("Addtime")
				Me.OnAddtimeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CreatUser", DbType:="NVarChar(20) NOT NULL", CanBeNull:=false)>  _
	Public Property CreatUser() As String
		Get
			Return Me._CreatUser
		End Get
		Set
			If (String.Equals(Me._CreatUser, value) = false) Then
				Me.OnCreatUserChanging(value)
				Me.SendPropertyChanging
				Me._CreatUser = value
				Me.SendPropertyChanged("CreatUser")
				Me.OnCreatUserChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_IsRepeat", DbType:="Bit NOT NULL")>  _
	Public Property IsRepeat() As Boolean
		Get
			Return Me._IsRepeat
		End Get
		Set
			If ((Me._IsRepeat = value)  _
						= false) Then
				Me.OnIsRepeatChanging(value)
				Me.SendPropertyChanging
				Me._IsRepeat = value
				Me.SendPropertyChanged("IsRepeat")
				Me.OnIsRepeatChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_IsOpen", DbType:="Bit NOT NULL")>  _
	Public Property IsOpen() As Boolean
		Get
			Return Me._IsOpen
		End Get
		Set
			If ((Me._IsOpen = value)  _
						= false) Then
				Me.OnIsOpenChanging(value)
				Me.SendPropertyChanging
				Me._IsOpen = value
				Me.SendPropertyChanged("IsOpen")
				Me.OnIsOpenChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_TimeLimt", DbType:="Int")>  _
	Public Property TimeLimt() As System.Nullable(Of Integer)
		Get
			Return Me._TimeLimt
		End Get
		Set
			If (Me._TimeLimt.Equals(value) = false) Then
				Me.OnTimeLimtChanging(value)
				Me.SendPropertyChanging
				Me._TimeLimt = value
				Me.SendPropertyChanged("TimeLimt")
				Me.OnTimeLimtChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_FailTime", DbType:="DateTime")>  _
	Public Property FailTime() As System.Nullable(Of Date)
		Get
			Return Me._FailTime
		End Get
		Set
			If (Me._FailTime.Equals(value) = false) Then
				Me.OnFailTimeChanging(value)
				Me.SendPropertyChanging
				Me._FailTime = value
				Me.SendPropertyChanged("FailTime")
				Me.OnFailTimeChanged
			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.Vote_Question")>  _
Partial Public Class Vote_Question
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _SubID As Integer
	
	Private _Title As String
	
	Private _Pictrue As String
	
	Private _VoteType As String
	
	Private _Integral As Integer
	
	Private _RightOptionID 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 OnSubIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnSubIDChanged()
    End Sub
    Partial Private Sub OnTitleChanging(value As String)
    End Sub
    Partial Private Sub OnTitleChanged()
    End Sub
    Partial Private Sub OnPictrueChanging(value As String)
    End Sub
    Partial Private Sub OnPictrueChanged()
    End Sub
    Partial Private Sub OnVoteTypeChanging(value As String)
    End Sub
    Partial Private Sub OnVoteTypeChanged()
    End Sub
    Partial Private Sub OnIntegralChanging(value As Integer)
    End Sub
    Partial Private Sub OnIntegralChanged()
    End Sub
    Partial Private Sub OnRightOptionIDChanging(value As String)
    End Sub
    Partial Private Sub OnRightOptionIDChanged()
    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:="_SubID", DbType:="Int NOT NULL")>  _
	Public Property SubID() As Integer
		Get
			Return Me._SubID
		End Get
		Set
			If ((Me._SubID = value)  _
						= false) Then
				Me.OnSubIDChanging(value)
				Me.SendPropertyChanging
				Me._SubID = value
				Me.SendPropertyChanged("SubID")
				Me.OnSubIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Title", DbType:="NVarChar(100) 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:="_Pictrue", DbType:="VarChar(100)")>  _
	Public Property Pictrue() As String
		Get
			Return Me._Pictrue
		End Get
		Set
			If (String.Equals(Me._Pictrue, value) = false) Then
				Me.OnPictrueChanging(value)
				Me.SendPropertyChanging
				Me._Pictrue = value
				Me.SendPropertyChanged("Pictrue")
				Me.OnPictrueChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_VoteType", DbType:="NVarChar(8) NOT NULL", CanBeNull:=false)>  _
	Public Property VoteType() As String
		Get
			Return Me._VoteType
		End Get
		Set
			If (String.Equals(Me._VoteType, value) = false) Then
				Me.OnVoteTypeChanging(value)
				Me.SendPropertyChanging
				Me._VoteType = value
				Me.SendPropertyChanged("VoteType")
				Me.OnVoteTypeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Integral", DbType:="Int NOT NULL")>  _
	Public Property Integral() As Integer
		Get
			Return Me._Integral
		End Get
		Set
			If ((Me._Integral = value)  _
						= false) Then
				Me.OnIntegralChanging(value)
				Me.SendPropertyChanging
				Me._Integral = value
				Me.SendPropertyChanged("Integral")
				Me.OnIntegralChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_RightOptionID", DbType:="NVarChar(50)")>  _
	Public Property RightOptionID() As String
		Get
			Return Me._RightOptionID
		End Get
		Set
			If (String.Equals(Me._RightOptionID, value) = false) Then
				Me.OnRightOptionIDChanging(value)
				Me.SendPropertyChanging
				Me._RightOptionID = value
				Me.SendPropertyChanged("RightOptionID")
				Me.OnRightOptionIDChanged
			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.Vote_Option")>  _
Partial Public Class Vote_Option
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _SubID As Integer
	
	Private _QuesID As Integer
	
	Private _OptText As String
	
	Private _OptPicture 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 OnSubIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnSubIDChanged()
    End Sub
    Partial Private Sub OnQuesIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnQuesIDChanged()
    End Sub
    Partial Private Sub OnOptTextChanging(value As String)
    End Sub
    Partial Private Sub OnOptTextChanged()
    End Sub
    Partial Private Sub OnOptPictureChanging(value As String)
    End Sub
    Partial Private Sub OnOptPictureChanged()
    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:="_SubID", DbType:="Int NOT NULL")>  _
	Public Property SubID() As Integer
		Get
			Return Me._SubID
		End Get
		Set
			If ((Me._SubID = value)  _
						= false) Then
				Me.OnSubIDChanging(value)
				Me.SendPropertyChanging
				Me._SubID = value
				Me.SendPropertyChanged("SubID")
				Me.OnSubIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_QuesID", DbType:="Int NOT NULL")>  _
	Public Property QuesID() As Integer
		Get
			Return Me._QuesID
		End Get
		Set
			If ((Me._QuesID = value)  _
						= false) Then
				Me.OnQuesIDChanging(value)
				Me.SendPropertyChanging
				Me._QuesID = value
				Me.SendPropertyChanged("QuesID")
				Me.OnQuesIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_OptText", DbType:="NVarChar(100)")>  _
	Public Property OptText() As String
		Get
			Return Me._OptText
		End Get
		Set
			If (String.Equals(Me._OptText, value) = false) Then
				Me.OnOptTextChanging(value)
				Me.SendPropertyChanging
				Me._OptText = value
				Me.SendPropertyChanged("OptText")
				Me.OnOptTextChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_OptPicture", DbType:="NVarChar(100)")>  _
	Public Property OptPicture() As String
		Get
			Return Me._OptPicture
		End Get
		Set
			If (String.Equals(Me._OptPicture, value) = false) Then
				Me.OnOptPictureChanging(value)
				Me.SendPropertyChanging
				Me._OptPicture = value
				Me.SendPropertyChanged("OptPicture")
				Me.OnOptPictureChanged
			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
