Ejemplo n.º 1
0
        private void AddQuestionButton_Click(object sender, EventArgs e)
        {
            this.Hide();
            var questionForm = new QuestionForm(this);

            questionForm.Show();
        }
Ejemplo n.º 2
0
 private void EditQuestionButton_Click(object sender, EventArgs e)
 {
     try
     {
         var      id       = GetSelectedQuestionNumber();
         Question question = Dao.GetQuestionByNumber(id);
         this.Hide();
         var questionForm = new QuestionForm(this, question);
         questionForm.Show();
     }
     catch (Exception exception)
     {
         MessageBox.Show(@"Cannot extract selected question", @"Error",
                         MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }