private void buttonSave_Click(object sender, EventArgs e) { QuestionModel question = new QuestionModel(this.richTextBoxImageQuestion.Text, "Image", this.test, Convert.ToInt32(this.textBoxImageValue.Text)); question.Image = pictureBoxImage.Image; question.Answers.Add(new UserChoice(this.textBoxAnswerImage.Text)); question.Choises.Add(new UserChoice(this.textBoxChoiceImage1.Text)); question.Choises.Add(new UserChoice(this.textBoxChoiceImage2.Text)); question.Choises.Add(new UserChoice(this.textBoxChoiceImage3.Text)); if (questionController.AddQuestionWithImage(question)) { MessageBox.Show("Question Successfuly added"); } else { MessageBox.Show("error"); } }