您目前尚未登陆,请选择【登陆】或【注册
首页->功能源码->Linq三层模式之增删改源码>>App-Code/Linq/Staff.designer.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Linq三层模式之增删改源码
当前文件:文件类型 LinqDemo/App_Code/Linq/Staff.designer.cs打开代码结构图
高亮显示
		            #pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行库版本:2.0.50727.1433
//     51aspx.com 16:14 2008/7/15
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace Linq
{
	using System.Data.Linq;
	using System.Data.Linq.Mapping;
	using System.Data;
	using System.Collections.Generic;
	using System.Reflection;
	using System.Linq;
	using System.Linq.Expressions;
	using System.ComponentModel;
	using System;
	
	
	[System.Data.Linq.Mapping.DatabaseAttribute(Name="DutyDemo")]
	public partial class StaffDataContext : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    partial void InsertDutyStaff(DutyStaff instance);
    partial void UpdateDutyStaff(DutyStaff instance);
    partial void DeleteDutyStaff(DutyStaff instance);
    #endregion
		
		public StaffDataContext() : 
				base(global::System.Configuration.ConfigurationManager.ConnectionStrings["DutyDemoConnectionString"].ConnectionString, mappingSource)
		{
			OnCreated();
		}
		
		public StaffDataContext(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public StaffDataContext(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public StaffDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public StaffDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<DutyStaff> DutyStaff
		{
			get
			{
				return this.GetTable<DutyStaff>();
			}
		}
	}
	
	[Table(Name="dbo.DutyStaff")]
	public partial class DutyStaff : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _ID;
		
		private string _StaffName;
		
		private int _StaffAge;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnIDChanging(int value);
    partial void OnIDChanged();
    partial void OnStaffNameChanging(string value);
    partial void OnStaffNameChanged();
    partial void OnStaffAgeChanging(int value);
    partial void OnStaffAgeChanged();
    #endregion
		
		public DutyStaff()
		{
			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.OnIDChanging(value);
					this.SendPropertyChanging();
					this._ID = value;
					this.SendPropertyChanged("ID");
					this.OnIDChanged();
				}
			}
		}
		
		[Column(Storage="_StaffName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string StaffName
		{
			get
			{
				return this._StaffName;
			}
			set
			{
				if ((this._StaffName != value))
				{
					this.OnStaffNameChanging(value);
					this.SendPropertyChanging();
					this._StaffName = value;
					this.SendPropertyChanged("StaffName");
					this.OnStaffNameChanged();
				}
			}
		}
		
		[Column(Storage="_StaffAge", DbType="Int NOT NULL")]
		public int StaffAge
		{
			get
			{
				return this._StaffAge;
			}
			set
			{
				if ((this._StaffAge != value))
				{
					this.OnStaffAgeChanging(value);
					this.SendPropertyChanging();
					this._StaffAge = value;
					this.SendPropertyChanged("StaffAge");
					this.OnStaffAgeChanged();
				}
			}
		}
		
		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


        
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Linq三层模式之增删改源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号