#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行库版本:2.0.50727.1433
//
//     对此文件的更改可能会导致不正确的行为，并且如果
//     重新生成代码，这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;



[System.Data.Linq.Mapping.DatabaseAttribute(Name="SQL_Data")]
public partial class DataClassesDataContext : System.Data.Linq.DataContext
{
	
	private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
	
  #region Extensibility Method Definitions
  partial void OnCreated();
  partial void Insert职工(职工 instance);
  partial void Update职工(职工 instance);
  partial void Delete职工(职工 instance);
  #endregion
	
	public DataClassesDataContext() : 
			base(global::System.Configuration.ConfigurationManager.ConnectionStrings["SQL_DataConnectionString"].ConnectionString, mappingSource)
	{
		OnCreated();
	}
	
	public DataClassesDataContext(string connection) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public DataClassesDataContext(System.Data.IDbConnection connection) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public DataClassesDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public DataClassesDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public System.Data.Linq.Table<职工> 职工
	{
		get
		{
			return this.GetTable<职工>();
		}
	}
}

[Table(Name="dbo.职工")]
public partial class 职工 : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _职工ID;
	
	private string _职工号;
	
	private string _仓库号;
	
	private string _姓名;
	
	private string _性别;
	
	private System.Nullable<int> _工资;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void On职工IDChanging(int value);
    partial void On职工IDChanged();
    partial void On职工号Changing(string value);
    partial void On职工号Changed();
    partial void On仓库号Changing(string value);
    partial void On仓库号Changed();
    partial void On姓名Changing(string value);
    partial void On姓名Changed();
    partial void On性别Changing(string value);
    partial void On性别Changed();
    partial void On工资Changing(System.Nullable<int> value);
    partial void On工资Changed();
    #endregion
	
	public 职工()
	{
		OnCreated();
	}
	
	[Column(Storage="_职工ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int 职工ID
	{
		get
		{
			return this._职工ID;
		}
		set
		{
			if ((this._职工ID != value))
			{
				this.On职工IDChanging(value);
				this.SendPropertyChanging();
				this._职工ID = value;
				this.SendPropertyChanged("职工ID");
				this.On职工IDChanged();
			}
		}
	}
	
	[Column(Storage="_职工号", DbType="VarChar(50)")]
	public string 职工号
	{
		get
		{
			return this._职工号;
		}
		set
		{
			if ((this._职工号 != value))
			{
				this.On职工号Changing(value);
				this.SendPropertyChanging();
				this._职工号 = value;
				this.SendPropertyChanged("职工号");
				this.On职工号Changed();
			}
		}
	}
	
	[Column(Storage="_仓库号", DbType="VarChar(50)")]
	public string 仓库号
	{
		get
		{
			return this._仓库号;
		}
		set
		{
			if ((this._仓库号 != value))
			{
				this.On仓库号Changing(value);
				this.SendPropertyChanging();
				this._仓库号 = value;
				this.SendPropertyChanged("仓库号");
				this.On仓库号Changed();
			}
		}
	}
	
	[Column(Storage="_姓名", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
	public string 姓名
	{
		get
		{
			return this._姓名;
		}
		set
		{
			if ((this._姓名 != value))
			{
				this.On姓名Changing(value);
				this.SendPropertyChanging();
				this._姓名 = value;
				this.SendPropertyChanged("姓名");
				this.On姓名Changed();
			}
		}
	}
	
	[Column(Storage="_性别", DbType="VarChar(10)")]
	public string 性别
	{
		get
		{
			return this._性别;
		}
		set
		{
			if ((this._性别 != value))
			{
				this.On性别Changing(value);
				this.SendPropertyChanging();
				this._性别 = value;
				this.SendPropertyChanged("性别");
				this.On性别Changed();
			}
		}
	}
	
	[Column(Storage="_工资", DbType="Int")]
	public System.Nullable<int> 工资
	{
		get
		{
			return this._工资;
		}
		set
		{
			if ((this._工资 != value))
			{
				this.On工资Changing(value);
				this.SendPropertyChanging();
				this._工资 = value;
				this.SendPropertyChanged("工资");
				this.On工资Changed();
			}
		}
	}
	
	public event PropertyChangingEventHandler PropertyChanging;
	
	public event PropertyChangedEventHandler PropertyChanged;
	
	protected virtual void SendPropertyChanging()
	{
		if ((this.PropertyChanging != null))
		{
			this.PropertyChanging(this, emptyChangingEventArgs);
		}
	}
	
	protected virtual void SendPropertyChanged(String propertyName)
	{
		if ((this.PropertyChanged != null))
		{
			this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
		}
	}
}
#pragma warning restore 1591
