Example #1
0
        private void SaveQuestion()
        {
            Color plainColor = Color.White;

            if (currentQuestion.IdQuestion == 0)
            {
                Question q = db.CreateNewVoidQuestion();
                currentQuestion.IdQuestion = q.IdQuestion;
            }
            if (currentQuestion.IdTopic == 0 && currentTopic != null)
            {
                currentQuestion.IdTopic = currentTopic.Id;
            }

            db.SaveQuestion(currentQuestion);
            txtQuestionText.BackColor = plainColor;
            txtIdQuestion.BackColor   = plainColor;
            txtDifficulty.BackColor   = plainColor;
            txtDuration.BackColor     = plainColor;
            txtWeight.BackColor       = plainColor;
            txtQuestionText.BackColor = plainColor;
            txtTopic.BackColor        = plainColor;
        }