示例#1
0
 public tblExam AddExam(Exam createdExam)
 {
     try
     {
         tblExam exam = new tblExam(); //Maak een exam aan en voeg alle gegevens toe n.a.v. de meegegeven exam.
         exam.starttime = createdExam.Starttime;
         exam.endtime = createdExam.Endtime;
         exam.id = createdExam.Examnr;
         exam.questionnaire = createdExam.Questionnaire.ID;
         exam.lecture = createdExam.Lecture.ID;
         db.tblExams.InsertOnSubmit(exam); //Voeg de exam toe aan de database en submit de changes.
         db.SubmitChanges();
         return exam;
     }
     catch (SqlException ex)
     {
         MessageBox.Show(ex.Message); return null; //Wanneer er iets fout gaat, laat een messagebox zien met de SQL exception.
     }
 }
示例#2
0
		private void detach_exams(tblExam entity)
		{
			this.SendPropertyChanging();
			entity.tblLecture = null;
		}
示例#3
0
 partial void DeletetblExam(tblExam instance);
示例#4
0
 partial void UpdatetblExam(tblExam instance);
示例#5
0
 partial void InserttblExam(tblExam instance);
示例#6
0
		private void detach_tblExams(tblExam entity)
		{
			this.SendPropertyChanging();
			entity.tblQuestionnaire = null;
		}
示例#7
0
		private void attach_exams(tblExam entity)
		{
			this.SendPropertyChanging();
			entity.tblQuestion = this;
		}