⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dataclasses.designer.cs

📁 精通网络应用系统开发 光盘 该书是人民邮电出版社出版的
💻 CS
📖 第 1 页 / 共 5 页
字号:
	}
	
	private void detach_Classes(Class entity)
	{
		this.SendPropertyChanging();
		entity.Grade = null;
	}
}

[Table(Name="dbo.Role")]
public partial class Role : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _RoleID;
	
	private string _RoleName;
	
	private System.Nullable<int> _TreeID;
	
	private EntitySet<User> _Users;
	
	private EntityRef<Tree> _Tree;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnRoleIDChanging(int value);
    partial void OnRoleIDChanged();
    partial void OnRoleNameChanging(string value);
    partial void OnRoleNameChanged();
    partial void OnTreeIDChanging(System.Nullable<int> value);
    partial void OnTreeIDChanged();
    #endregion
	
	public Role()
	{
		this._Users = new EntitySet<User>(new Action<User>(this.attach_Users), new Action<User>(this.detach_Users));
		this._Tree = default(EntityRef<Tree>);
		OnCreated();
	}
	
	[Column(Storage="_RoleID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int RoleID
	{
		get
		{
			return this._RoleID;
		}
		set
		{
			if ((this._RoleID != value))
			{
				this.OnRoleIDChanging(value);
				this.SendPropertyChanging();
				this._RoleID = value;
				this.SendPropertyChanged("RoleID");
				this.OnRoleIDChanged();
			}
		}
	}
	
	[Column(Storage="_RoleName", DbType="VarChar(200)")]
	public string RoleName
	{
		get
		{
			return this._RoleName;
		}
		set
		{
			if ((this._RoleName != value))
			{
				this.OnRoleNameChanging(value);
				this.SendPropertyChanging();
				this._RoleName = value;
				this.SendPropertyChanged("RoleName");
				this.OnRoleNameChanged();
			}
		}
	}
	
	[Column(Storage="_TreeID", DbType="Int")]
	public System.Nullable<int> TreeID
	{
		get
		{
			return this._TreeID;
		}
		set
		{
			if ((this._TreeID != value))
			{
				if (this._Tree.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnTreeIDChanging(value);
				this.SendPropertyChanging();
				this._TreeID = value;
				this.SendPropertyChanged("TreeID");
				this.OnTreeIDChanged();
			}
		}
	}
	
	[Association(Name="Role_User", Storage="_Users", OtherKey="RoleID")]
	public EntitySet<User> Users
	{
		get
		{
			return this._Users;
		}
		set
		{
			this._Users.Assign(value);
		}
	}
	
	[Association(Name="Tree_Role", Storage="_Tree", ThisKey="TreeID", IsForeignKey=true)]
	public Tree Tree
	{
		get
		{
			return this._Tree.Entity;
		}
		set
		{
			Tree previousValue = this._Tree.Entity;
			if (((previousValue != value) 
						|| (this._Tree.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._Tree.Entity = null;
					previousValue.Roles.Remove(this);
				}
				this._Tree.Entity = value;
				if ((value != null))
				{
					value.Roles.Add(this);
					this._TreeID = value.TreeID;
				}
				else
				{
					this._TreeID = default(Nullable<int>);
				}
				this.SendPropertyChanged("Tree");
			}
		}
	}
	
	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));
		}
	}
	
	private void attach_Users(User entity)
	{
		this.SendPropertyChanging();
		entity.Role = this;
	}
	
	private void detach_Users(User entity)
	{
		this.SendPropertyChanging();
		entity.Role = null;
	}
}

[Table(Name="dbo.Score")]
public partial class Score : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _ScoreID;
	
	private System.Nullable<int> _StudentID;
	
	private System.Nullable<int> _CourseID;
	
	private System.Nullable<decimal> _Mark;
	
	private System.Nullable<int> _Flag;
	
	private EntityRef<Course> _Course;
	
	private EntityRef<Student> _Student;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnScoreIDChanging(int value);
    partial void OnScoreIDChanged();
    partial void OnStudentIDChanging(System.Nullable<int> value);
    partial void OnStudentIDChanged();
    partial void OnCourseIDChanging(System.Nullable<int> value);
    partial void OnCourseIDChanged();
    partial void OnMarkChanging(System.Nullable<decimal> value);
    partial void OnMarkChanged();
    partial void OnFlagChanging(System.Nullable<int> value);
    partial void OnFlagChanged();
    #endregion
	
	public Score()
	{
		this._Course = default(EntityRef<Course>);
		this._Student = default(EntityRef<Student>);
		OnCreated();
	}
	
	[Column(Storage="_ScoreID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int ScoreID
	{
		get
		{
			return this._ScoreID;
		}
		set
		{
			if ((this._ScoreID != value))
			{
				this.OnScoreIDChanging(value);
				this.SendPropertyChanging();
				this._ScoreID = value;
				this.SendPropertyChanged("ScoreID");
				this.OnScoreIDChanged();
			}
		}
	}
	
	[Column(Storage="_StudentID", DbType="Int")]
	public System.Nullable<int> StudentID
	{
		get
		{
			return this._StudentID;
		}
		set
		{
			if ((this._StudentID != value))
			{
				if (this._Student.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnStudentIDChanging(value);
				this.SendPropertyChanging();
				this._StudentID = value;
				this.SendPropertyChanged("StudentID");
				this.OnStudentIDChanged();
			}
		}
	}
	
	[Column(Storage="_CourseID", DbType="Int")]
	public System.Nullable<int> CourseID
	{
		get
		{
			return this._CourseID;
		}
		set
		{
			if ((this._CourseID != value))
			{
				if (this._Course.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnCourseIDChanging(value);
				this.SendPropertyChanging();
				this._CourseID = value;
				this.SendPropertyChanged("CourseID");
				this.OnCourseIDChanged();
			}
		}
	}
	
	[Column(Storage="_Mark", DbType="Decimal(18,0)")]
	public System.Nullable<decimal> Mark
	{
		get
		{
			return this._Mark;
		}
		set
		{
			if ((this._Mark != value))
			{
				this.OnMarkChanging(value);
				this.SendPropertyChanging();
				this._Mark = value;
				this.SendPropertyChanged("Mark");
				this.OnMarkChanged();
			}
		}
	}
	
	[Column(Storage="_Flag", DbType="Int")]
	public System.Nullable<int> Flag
	{
		get
		{
			return this._Flag;
		}
		set
		{
			if ((this._Flag != value))
			{
				this.OnFlagChanging(value);
				this.SendPropertyChanging();
				this._Flag = value;
				this.SendPropertyChanged("Flag");
				this.OnFlagChanged();
			}
		}
	}
	
	[Association(Name="Course_Score", Storage="_Course", ThisKey="CourseID", IsForeignKey=true)]
	public Course Course
	{
		get
		{
			return this._Course.Entity;
		}
		set
		{
			Course previousValue = this._Course.Entity;
			if (((previousValue != value) 
						|| (this._Course.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._Course.Entity = null;
					previousValue.Scores.Remove(this);
				}
				this._Course.Entity = value;
				if ((value != null))
				{
					value.Scores.Add(this);
					this._CourseID = value.CourseID;
				}
				else
				{
					this._CourseID = default(Nullable<int>);
				}
				this.SendPropertyChanged("Course");
			}
		}
	}
	
	[Association(Name="Student_Score", Storage="_Student", ThisKey="StudentID", IsForeignKey=true)]
	public Student Student
	{
		get
		{
			return this._Student.Entity;
		}
		set
		{
			Student previousValue = this._Student.Entity;
			if (((previousValue != value) 
						|| (this._Student.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._Student.Entity = null;
					previousValue.Scores.Remove(this);
				}
				this._Student.Entity = value;
				if ((value != null))
				{
					value.Scores.Add(this);
					this._StudentID = value.StudentID;
				}
				else
				{
					this._StudentID = default(Nullable<int>);
				}
				this.SendPropertyChanged("Student");
			}
		}
	}
	
	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));
		}
	}
}

[Table(Name="dbo.Student")]
public partial class Student : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _StudentID;
	
	private System.Nullable<int> _ClassID;
	
	private string _Name;
	
	private System.Nullable<int> _Age;
	
	private System.Nullable<int> _Sex;
	
	private string _Address;
	
	private string _Phone;
	
	private System.Nullable<System.DateTime> _Birthday;
	
	private System.Nullable<System.DateTime> _EntranceDate;
	
	private string _Nationality;
	
	private string _Political;
	
	private string _NativePlace;
	
	private string _IdentityCard;
	
	private System.Nullable<int> _Marital;
	
	private string _Hukou;
	
	private System.Nullable<int> _State;
	
	private string _Desn;
	
	private EntitySet<Score> _Scores;
	
	private EntityRef<Class> _Class;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnStudentIDChanging(int value);
    partial void OnStudentIDChanged();
    partial void OnClassIDChanging(System.Nullable<int> value);
    partial void OnClassIDChanged();
    partial void OnNameChanging(string value);
    partial void OnNameChanged();
    partial void OnAgeChanging(System.Nullable<int> value);
    partial void OnAgeChanged();
    partial void OnSexChanging(System.Nullable<int> value);
    partial void OnSexChanged();
    partial void OnAddressChanging(string value);
    partial void OnAddressChanged();
    partial void OnPhoneChanging(string value);
    partial void OnPhoneChanged();
    partial void OnBirthdayChanging(System.Nullable<System.DateTime> value);
    partial void OnBirthdayChanged();
    partial void OnEntranceDateChanging(System.Nullable<System.DateTime> value);
    partial void OnEntranceDateChanged();
    partial void OnNationalityChanging(string value);
    partial void OnNationalityChanged();
    partial void OnPoliticalChanging(string value);
    partial void OnPoliticalChanged();
    partial void OnNativePlaceChanging(string value);
    partial void OnNativePlaceChanged();
    partial void OnIdentityCardChanging(string value);
    partial void OnIdentityCardChanged();
    partial void OnMaritalChanging(System.Nullable<int> value);
    partial void OnMaritalChanged();
    partial void OnHukouChanging(string value);
    partial void OnHukouChanged();
    partial void OnStateChanging(System.Nullable<int> value);
    partial void OnStateChanged();
    partial void OnDesnChanging(string value);
    partial void OnDesnChanged();
    #endregion
	
	public Student()
	{
		this._Scores = new EntitySet<Score>(new Action<Score>(this.attach_Scores), new Action<Score>(this.detach_Scores));
		this._Class = default(EntityRef<Class>);
		OnCreated();
	}
	
	[Column(Storage="_StudentID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int StudentID
	{
		get
		{
			return this._StudentID;
		}
		set
		{
			if ((this._StudentID != value))
			{
				this.OnStudentIDChanging(value);
				this.SendPropertyChanging();
				this._StudentID = value;
				this.SendPropertyChanged("StudentID");
				this.OnStudentIDChanged();
			}
		}
	}
	
	[Column(Storage="_ClassID", DbType="Int")]
	public System.Nullable<int> ClassID
	{
		get
		{
			return this._ClassID;
		}
		set
		{
			if ((this._ClassID != value))
			{
				if (this._Class.HasLoadedOrAssignedValue)
				{

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -