示例#1
0
        public void create(Question question, int testId)
        {
            SqlLiteSimpleExecute.execute(queryConfigurator.createQuestion(testId));
            question.Id = DataSetConverter.fromDsToSingle.toInt.convert(SqlLiteSimpleExecute.
                                                                        execute(queryConfigurator.getObjectIdInDevelopStatus(DbTypes.question)));
            SqlLiteSimpleExecute.execute(queryConfigurator.setQuestionContent(question.Id,
                                                                              EncryptWorker.getInstance().encrypt(question.QuestionsContent)));
            SqlLiteSimpleExecute.execute(queryConfigurator.setQuestionType(question.Id,
                                                                           question.QuestionsType));


            for (int i = 0; i < question.Unswers.Count; i++)
            {
                unswerManipalator.create(question.Unswers.ElementAt(i), question.Id);
            }
            SqlLiteSimpleExecute.execute(queryConfigurator.setApproveStatusToObject(
                                             DbTypes.question));
        }