private void Delete_button_Click(object sender, EventArgs e)
 {
     if (ID != -1)
     {
         Quiz_question quiz_Question = DB_Connection.db.GetTable <Quiz_question>().Where(x => x.Id == ID).Single();
         DB_Connection.db.GetTable <Quiz_question>().DeleteOnSubmit(quiz_Question);
         DB_Connection.db.SubmitChanges();
         this.quiz_questionsTableAdapter.FillQuestionsBySelectedQuizName(this.quizDataSet.Quiz_questions, int.Parse(QuizName_comboBox.SelectedValue.ToString()));
         Question_textBox.Text = null;
         Answer_textBox.Text   = null;
     }
 }
 private void Add_button_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrWhiteSpace(Question_textBox.Text) && !String.IsNullOrWhiteSpace(Answer_textBox.Text))
     {
         Quiz_question quiz_Question = new Quiz_question();
         quiz_Question.Quiz_id  = int.Parse(QuizNameChange_comboBox.SelectedValue.ToString());
         quiz_Question.Question = Question_textBox.Text;
         quiz_Question.Answer   = Answer_textBox.Text;
         DB_Connection.db.GetTable <Quiz_question>().InsertOnSubmit(quiz_Question);
         DB_Connection.db.SubmitChanges();
         this.quiz_questionsTableAdapter.FillQuestionsBySelectedQuizName(this.quizDataSet.Quiz_questions, int.Parse(QuizName_comboBox.SelectedValue.ToString()));
         QuizNameChange_comboBox.SelectedValue = QuizName_comboBox.SelectedValue;
         Question_textBox.Text = null;
         Answer_textBox.Text   = null;
     }
 }
 partial void DeleteQuiz_question(Quiz_question instance);
 partial void UpdateQuiz_question(Quiz_question instance);
 partial void InsertQuiz_question(Quiz_question instance);
 private void detach_Quiz_questions(Quiz_question entity)
 {
     this.SendPropertyChanging();
     entity.Quiz = null;
 }
 private void attach_Quiz_questions(Quiz_question entity)
 {
     this.SendPropertyChanging();
     entity.Quiz = this;
 }