'------------------------------------------------------------------------------
' <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_GoodsDataContext
	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 InsertYc_GoodsClass(instance As Yc_GoodsClass)
    End Sub
  Partial Private Sub UpdateYc_GoodsClass(instance As Yc_GoodsClass)
    End Sub
  Partial Private Sub DeleteYc_GoodsClass(instance As Yc_GoodsClass)
    End Sub
  Partial Private Sub InsertYc_GoodsOrderFrom(instance As Yc_GoodsOrderFrom)
    End Sub
  Partial Private Sub UpdateYc_GoodsOrderFrom(instance As Yc_GoodsOrderFrom)
    End Sub
  Partial Private Sub DeleteYc_GoodsOrderFrom(instance As Yc_GoodsOrderFrom)
    End Sub
  Partial Private Sub InsertYc_Goods(instance As Yc_Goods)
    End Sub
  Partial Private Sub UpdateYc_Goods(instance As Yc_Goods)
    End Sub
  Partial Private Sub DeleteYc_Goods(instance As Yc_Goods)
    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 Yc_GoodsClass() As System.Data.Linq.Table(Of Yc_GoodsClass)
		Get
			Return Me.GetTable(Of Yc_GoodsClass)
		End Get
	End Property
	
	Public ReadOnly Property Yc_GoodsOrderFrom() As System.Data.Linq.Table(Of Yc_GoodsOrderFrom)
		Get
			Return Me.GetTable(Of Yc_GoodsOrderFrom)
		End Get
	End Property
	
	Public ReadOnly Property Yc_Goods() As System.Data.Linq.Table(Of Yc_Goods)
		Get
			Return Me.GetTable(Of Yc_Goods)
		End Get
	End Property
End Class

<Table(Name:="dbo.Yc_GoodsClass")>  _
Partial Public Class Yc_GoodsClass
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ClassID As 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)
	
    #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 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
    #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:="_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
	
	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.Yc_GoodsOrderFrom")>  _
Partial Public Class Yc_GoodsOrderFrom
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ID As Integer
	
	Private _UserID As Integer
	
	Private _UserName As String
	
	Private _GoodsID As Integer
	
	Private _GoodsName As String
	
	Private _AddTime As Date
	
	Private _State 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 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 OnGoodsIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnGoodsIDChanged()
    End Sub
    Partial Private Sub OnGoodsNameChanging(value As String)
    End Sub
    Partial Private Sub OnGoodsNameChanged()
    End Sub
    Partial Private Sub OnAddTimeChanging(value As Date)
    End Sub
    Partial Private Sub OnAddTimeChanged()
    End Sub
    Partial Private Sub OnStateChanging(value As Integer)
    End Sub
    Partial Private Sub OnStateChanged()
    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:="_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:="NVarChar(50) 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:="_GoodsID", DbType:="Int NOT NULL")>  _
	Public Property GoodsID() As Integer
		Get
			Return Me._GoodsID
		End Get
		Set
			If ((Me._GoodsID = value)  _
						= false) Then
				Me.OnGoodsIDChanging(value)
				Me.SendPropertyChanging
				Me._GoodsID = value
				Me.SendPropertyChanged("GoodsID")
				Me.OnGoodsIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_GoodsName", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property GoodsName() As String
		Get
			Return Me._GoodsName
		End Get
		Set
			If (String.Equals(Me._GoodsName, value) = false) Then
				Me.OnGoodsNameChanging(value)
				Me.SendPropertyChanging
				Me._GoodsName = value
				Me.SendPropertyChanged("GoodsName")
				Me.OnGoodsNameChanged
			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:="_State", DbType:="Int NOT NULL")>  _
	Public Property State() As Integer
		Get
			Return Me._State
		End Get
		Set
			If ((Me._State = value)  _
						= false) Then
				Me.OnStateChanging(value)
				Me.SendPropertyChanging
				Me._State = value
				Me.SendPropertyChanged("State")
				Me.OnStateChanged
			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.Yc_Goods")>  _
Partial Public Class Yc_Goods
	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 _GoodsName As String
	
	Private _GoodsPoints As Integer
	
	Private _GoodsDetail As String
	
	Private _GoodsPics As String
	
	Private _HTMLPics 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 OnGoodsNameChanging(value As String)
    End Sub
    Partial Private Sub OnGoodsNameChanged()
    End Sub
    Partial Private Sub OnGoodsPointsChanging(value As Integer)
    End Sub
    Partial Private Sub OnGoodsPointsChanged()
    End Sub
    Partial Private Sub OnGoodsDetailChanging(value As String)
    End Sub
    Partial Private Sub OnGoodsDetailChanged()
    End Sub
    Partial Private Sub OnGoodsPicsChanging(value As String)
    End Sub
    Partial Private Sub OnGoodsPicsChanged()
    End Sub
    Partial Private Sub OnHTMLPicsChanging(value As String)
    End Sub
    Partial Private Sub OnHTMLPicsChanged()
    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:="_GoodsName", DbType:="NVarChar(100) NOT NULL", CanBeNull:=false)>  _
	Public Property GoodsName() As String
		Get
			Return Me._GoodsName
		End Get
		Set
			If (String.Equals(Me._GoodsName, value) = false) Then
				Me.OnGoodsNameChanging(value)
				Me.SendPropertyChanging
				Me._GoodsName = value
				Me.SendPropertyChanged("GoodsName")
				Me.OnGoodsNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_GoodsPoints", DbType:="Int NOT NULL")>  _
	Public Property GoodsPoints() As Integer
		Get
			Return Me._GoodsPoints
		End Get
		Set
			If ((Me._GoodsPoints = value)  _
						= false) Then
				Me.OnGoodsPointsChanging(value)
				Me.SendPropertyChanging
				Me._GoodsPoints = value
				Me.SendPropertyChanged("GoodsPoints")
				Me.OnGoodsPointsChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_GoodsDetail", DbType:="NVarChar(800) NOT NULL", CanBeNull:=false)>  _
	Public Property GoodsDetail() As String
		Get
			Return Me._GoodsDetail
		End Get
		Set
			If (String.Equals(Me._GoodsDetail, value) = false) Then
				Me.OnGoodsDetailChanging(value)
				Me.SendPropertyChanging
				Me._GoodsDetail = value
				Me.SendPropertyChanged("GoodsDetail")
				Me.OnGoodsDetailChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_GoodsPics", DbType:="NVarChar(500)")>  _
	Public Property GoodsPics() As String
		Get
			Return Me._GoodsPics
		End Get
		Set
			If (String.Equals(Me._GoodsPics, value) = false) Then
				Me.OnGoodsPicsChanging(value)
				Me.SendPropertyChanging
				Me._GoodsPics = value
				Me.SendPropertyChanged("GoodsPics")
				Me.OnGoodsPicsChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_HTMLPics", DbType:="NVarChar(800)")>  _
	Public Property HTMLPics() As String
		Get
			Return Me._HTMLPics
		End Get
		Set
			If (String.Equals(Me._HTMLPics, value) = false) Then
				Me.OnHTMLPicsChanging(value)
				Me.SendPropertyChanging
				Me._HTMLPics = value
				Me.SendPropertyChanged("HTMLPics")
				Me.OnHTMLPicsChanged
			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
