Beispiel #1
0
 //学生选课
 public bool ChooseCourse(String stuname, String course_num)
 {
     DataClassesDataContext da = new DataClassesDataContext();
     Student_Course sc = new Student_Course();
     sc.course = course_num;
     sc.student = stuname;
     da.Student_Course.InsertOnSubmit(sc);
     da.SubmitChanges();
     return true;
 }
 partial void DeleteStudent_Course(Student_Course instance);
 partial void UpdateStudent_Course(Student_Course instance);
 partial void InsertStudent_Course(Student_Course instance);
		private void detach_Student_Course(Student_Course entity)
		{
			this.SendPropertyChanging();
			entity.Student1 = null;
		}
		private void attach_Student_Course(Student_Course entity)
		{
			this.SendPropertyChanging();
			entity.Student1 = this;
		}