private void UnpackQuestionString(bool isEdit) { if (isEdit == false) { IQuestion question = _dao.CreateNewQuestion(_questionString); _questions.Add(question); _questionsIds.Add(question.Id); SetMaxPoints(question.Points); } else // question Edit { // no new question in dao, no new id, replacement of question.points int selectedIndex = _selectedIndex; _questionString.Add(_questionsIds[selectedIndex].ToString()); SetMaxPoints(-_questions[selectedIndex].Points); IQuestion question = _dao.CreateTempQuestion(_questionString); _questions[selectedIndex] = question; SetMaxPoints(_questions[selectedIndex].Points); } }