Esempio n. 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.
     }
 }
Esempio n. 2
0
		private void detach_exams(tblExam entity)
		{
			this.SendPropertyChanging();
			entity.tblLecture = null;
		}
Esempio n. 3
0
 partial void DeletetblExam(tblExam instance);
Esempio n. 4
0
 partial void UpdatetblExam(tblExam instance);
Esempio n. 5
0
 partial void InserttblExam(tblExam instance);
Esempio n. 6
0
		private void detach_tblExams(tblExam entity)
		{
			this.SendPropertyChanging();
			entity.tblQuestionnaire = null;
		}
Esempio n. 7
0
		private void attach_exams(tblExam entity)
		{
			this.SendPropertyChanging();
			entity.tblQuestion = this;
		}