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

📄 dataclasses.designer.cs

📁 精通网络应用系统开发 光盘 该书是人民邮电出版社出版的
💻 CS
📖 第 1 页 / 共 5 页
字号:
		get
		{
			return this._CourseID;
		}
		set
		{
			if ((this._CourseID != value))
			{
				this.OnCourseIDChanging(value);
				this.SendPropertyChanging();
				this._CourseID = value;
				this.SendPropertyChanged("CourseID");
				this.OnCourseIDChanged();
			}
		}
	}
	
	[Column(Storage="_Desn", DbType="VarChar(200)")]
	public string Desn
	{
		get
		{
			return this._Desn;
		}
		set
		{
			if ((this._Desn != value))
			{
				this.OnDesnChanging(value);
				this.SendPropertyChanging();
				this._Desn = value;
				this.SendPropertyChanged("Desn");
				this.OnDesnChanged();
			}
		}
	}
	
	[Column(Storage="_Body", DbType="Text", UpdateCheck=UpdateCheck.Never)]
	public string Body
	{
		get
		{
			return this._Body;
		}
		set
		{
			if ((this._Body != value))
			{
				this.OnBodyChanging(value);
				this.SendPropertyChanging();
				this._Body = value;
				this.SendPropertyChanged("Body");
				this.OnBodyChanged();
			}
		}
	}
	
	[Column(Storage="_StartDate", DbType="DateTime")]
	public System.Nullable<System.DateTime> StartDate
	{
		get
		{
			return this._StartDate;
		}
		set
		{
			if ((this._StartDate != value))
			{
				this.OnStartDateChanging(value);
				this.SendPropertyChanging();
				this._StartDate = value;
				this.SendPropertyChanged("StartDate");
				this.OnStartDateChanged();
			}
		}
	}
	
	[Column(Storage="_EndDate", DbType="DateTime")]
	public System.Nullable<System.DateTime> EndDate
	{
		get
		{
			return this._EndDate;
		}
		set
		{
			if ((this._EndDate != value))
			{
				this.OnEndDateChanging(value);
				this.SendPropertyChanging();
				this._EndDate = value;
				this.SendPropertyChanged("EndDate");
				this.OnEndDateChanged();
			}
		}
	}
	
	[Column(Storage="_CourseHour", DbType="Int")]
	public System.Nullable<int> CourseHour
	{
		get
		{
			return this._CourseHour;
		}
		set
		{
			if ((this._CourseHour != value))
			{
				this.OnCourseHourChanging(value);
				this.SendPropertyChanging();
				this._CourseHour = value;
				this.SendPropertyChanged("CourseHour");
				this.OnCourseHourChanged();
			}
		}
	}
	
	[Column(Storage="_TeacherID", DbType="Int")]
	public System.Nullable<int> TeacherID
	{
		get
		{
			return this._TeacherID;
		}
		set
		{
			if ((this._TeacherID != value))
			{
				if (this._Teacher.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnTeacherIDChanging(value);
				this.SendPropertyChanging();
				this._TeacherID = value;
				this.SendPropertyChanged("TeacherID");
				this.OnTeacherIDChanged();
			}
		}
	}
	
	[Column(Storage="_ExamineDate", DbType="DateTime")]
	public System.Nullable<System.DateTime> ExamineDate
	{
		get
		{
			return this._ExamineDate;
		}
		set
		{
			if ((this._ExamineDate != value))
			{
				this.OnExamineDateChanging(value);
				this.SendPropertyChanging();
				this._ExamineDate = value;
				this.SendPropertyChanged("ExamineDate");
				this.OnExamineDateChanged();
			}
		}
	}
	
	[Column(Storage="_TotalMark", DbType="Decimal(18,0)")]
	public System.Nullable<decimal> TotalMark
	{
		get
		{
			return this._TotalMark;
		}
		set
		{
			if ((this._TotalMark != value))
			{
				this.OnTotalMarkChanging(value);
				this.SendPropertyChanging();
				this._TotalMark = value;
				this.SendPropertyChanged("TotalMark");
				this.OnTotalMarkChanged();
			}
		}
	}
	
	[Association(Name="Course_Score", Storage="_Scores", OtherKey="CourseID")]
	public EntitySet<Score> Scores
	{
		get
		{
			return this._Scores;
		}
		set
		{
			this._Scores.Assign(value);
		}
	}
	
	[Association(Name="Teacher_Course", Storage="_Teacher", ThisKey="TeacherID", IsForeignKey=true)]
	public Teacher Teacher
	{
		get
		{
			return this._Teacher.Entity;
		}
		set
		{
			Teacher previousValue = this._Teacher.Entity;
			if (((previousValue != value) 
						|| (this._Teacher.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._Teacher.Entity = null;
					previousValue.Courses.Remove(this);
				}
				this._Teacher.Entity = value;
				if ((value != null))
				{
					value.Courses.Add(this);
					this._TeacherID = value.TeacherID;
				}
				else
				{
					this._TeacherID = default(Nullable<int>);
				}
				this.SendPropertyChanged("Teacher");
			}
		}
	}
	
	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_Scores(Score entity)
	{
		this.SendPropertyChanging();
		entity.Course = this;
	}
	
	private void detach_Scores(Score entity)
	{
		this.SendPropertyChanging();
		entity.Course = null;
	}
}

[Table(Name="dbo.Department")]
public partial class Department : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _DepartmentID;
	
	private string _Desn;
	
	private string _Body;
	
	private EntitySet<Teacher> _Teachers;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnDepartmentIDChanging(int value);
    partial void OnDepartmentIDChanged();
    partial void OnDesnChanging(string value);
    partial void OnDesnChanged();
    partial void OnBodyChanging(string value);
    partial void OnBodyChanged();
    #endregion
	
	public Department()
	{
		this._Teachers = new EntitySet<Teacher>(new Action<Teacher>(this.attach_Teachers), new Action<Teacher>(this.detach_Teachers));
		OnCreated();
	}
	
	[Column(Storage="_DepartmentID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int DepartmentID
	{
		get
		{
			return this._DepartmentID;
		}
		set
		{
			if ((this._DepartmentID != value))
			{
				this.OnDepartmentIDChanging(value);
				this.SendPropertyChanging();
				this._DepartmentID = value;
				this.SendPropertyChanged("DepartmentID");
				this.OnDepartmentIDChanged();
			}
		}
	}
	
	[Column(Storage="_Desn", DbType="VarChar(200)")]
	public string Desn
	{
		get
		{
			return this._Desn;
		}
		set
		{
			if ((this._Desn != value))
			{
				this.OnDesnChanging(value);
				this.SendPropertyChanging();
				this._Desn = value;
				this.SendPropertyChanged("Desn");
				this.OnDesnChanged();
			}
		}
	}
	
	[Column(Storage="_Body", DbType="Text", UpdateCheck=UpdateCheck.Never)]
	public string Body
	{
		get
		{
			return this._Body;
		}
		set
		{
			if ((this._Body != value))
			{
				this.OnBodyChanging(value);
				this.SendPropertyChanging();
				this._Body = value;
				this.SendPropertyChanged("Body");
				this.OnBodyChanged();
			}
		}
	}
	
	[Association(Name="Department_Teacher", Storage="_Teachers", OtherKey="DepartmentID")]
	public EntitySet<Teacher> Teachers
	{
		get
		{
			return this._Teachers;
		}
		set
		{
			this._Teachers.Assign(value);
		}
	}
	
	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_Teachers(Teacher entity)
	{
		this.SendPropertyChanging();
		entity.Department = this;
	}
	
	private void detach_Teachers(Teacher entity)
	{
		this.SendPropertyChanging();
		entity.Department = null;
	}
}

[Table(Name="dbo.Grade")]
public partial class Grade : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _GradeID;
	
	private string _Desn;
	
	private System.Nullable<int> _YearDate;
	
	private System.Nullable<int> _Semester;
	
	private EntitySet<Class> _Classes;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnGradeIDChanging(int value);
    partial void OnGradeIDChanged();
    partial void OnDesnChanging(string value);
    partial void OnDesnChanged();
    partial void OnYearDateChanging(System.Nullable<int> value);
    partial void OnYearDateChanged();
    partial void OnSemesterChanging(System.Nullable<int> value);
    partial void OnSemesterChanged();
    #endregion
	
	public Grade()
	{
		this._Classes = new EntitySet<Class>(new Action<Class>(this.attach_Classes), new Action<Class>(this.detach_Classes));
		OnCreated();
	}
	
	[Column(Storage="_GradeID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int GradeID
	{
		get
		{
			return this._GradeID;
		}
		set
		{
			if ((this._GradeID != value))
			{
				this.OnGradeIDChanging(value);
				this.SendPropertyChanging();
				this._GradeID = value;
				this.SendPropertyChanged("GradeID");
				this.OnGradeIDChanged();
			}
		}
	}
	
	[Column(Storage="_Desn", DbType="VarChar(200)")]
	public string Desn
	{
		get
		{
			return this._Desn;
		}
		set
		{
			if ((this._Desn != value))
			{
				this.OnDesnChanging(value);
				this.SendPropertyChanging();
				this._Desn = value;
				this.SendPropertyChanged("Desn");
				this.OnDesnChanged();
			}
		}
	}
	
	[Column(Storage="_YearDate", DbType="Int")]
	public System.Nullable<int> YearDate
	{
		get
		{
			return this._YearDate;
		}
		set
		{
			if ((this._YearDate != value))
			{
				this.OnYearDateChanging(value);
				this.SendPropertyChanging();
				this._YearDate = value;
				this.SendPropertyChanged("YearDate");
				this.OnYearDateChanged();
			}
		}
	}
	
	[Column(Storage="_Semester", DbType="Int")]
	public System.Nullable<int> Semester
	{
		get
		{
			return this._Semester;
		}
		set
		{
			if ((this._Semester != value))
			{
				this.OnSemesterChanging(value);
				this.SendPropertyChanging();
				this._Semester = value;
				this.SendPropertyChanged("Semester");
				this.OnSemesterChanged();
			}
		}
	}
	
	[Association(Name="Grade_Class", Storage="_Classes", OtherKey="GradeID")]
	public EntitySet<Class> Classes
	{
		get
		{
			return this._Classes;
		}
		set
		{
			this._Classes.Assign(value);
		}
	}
	
	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_Classes(Class entity)
	{
		this.SendPropertyChanging();
		entity.Grade = this;

⌨️ 快捷键说明

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