// Token: 0x06000030 RID: 48 RVA: 0x00003E24 File Offset: 0x00002024 public static string GetQuestionRandom(int channelid, int count, string type, string sidlist, string qidlist) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat("SELECT [id] FROM [{0}Exam_ExamQuestion] WHERE [status]=1", DbConfigs.Prefix); if (channelid > 0) { stringBuilder.AppendFormat(" AND [channelid]={0}", channelid); } if (type != "") { stringBuilder.AppendFormat(" AND [type] IN({0})", type); } if (sidlist != "") { stringBuilder.AppendFormat(" AND [sortid] IN({0})", sidlist); } if (qidlist != "") { stringBuilder.AppendFormat(" AND [id] NOT IN({0})", qidlist); } IDataReader dataReader = DbHelper.ExecuteReader(CommandType.Text, stringBuilder.ToString()); string text = ""; while (dataReader.Read()) { if (text != "") { text += ","; } text += dataReader["id"].ToString(); } dataReader.Close(); return(QuestionBll.GetRandom(FPUtils.SplitString(text), count)); }
// Token: 0x06000033 RID: 51 RVA: 0x00004124 File Offset: 0x00002324 public static string GetTopicQuestion(int channelid, ExamTopic examtopic) { string text = examtopic.questionlist; string type; if (examtopic.type == -1) { type = "1,2"; } else { type = examtopic.type.ToString(); } if (examtopic.curquestions < examtopic.questions) { if (examtopic.randoms > 0) { int[] array = FPUtils.SplitInt(examtopic.randomsort); int[] array2 = FPUtils.SplitInt(examtopic.randomcount, ",", array.Length); for (int i = 0; i < array.Length; i++) { if (array2[i] > 0) { string questionRandom = QuestionBll.GetQuestionRandom(channelid, array2[i], type, array[i], text); if (questionRandom != "") { text += ((text == "") ? questionRandom : ("," + questionRandom)); } } } if (examtopic.questions - examtopic.curquestions - examtopic.randoms > 0) { string questionRandom = QuestionBll.GetQuestionRandom(channelid, examtopic.questions - examtopic.curquestions - examtopic.randoms - 1, type, "", text); if (questionRandom != "") { text += ((text == "") ? questionRandom : ("," + questionRandom)); } } } else { int count = examtopic.questions - examtopic.curquestions; string questionRandom = QuestionBll.GetQuestionRandom(channelid, count, type, "", text); if (questionRandom != "") { text += ((text == "") ? questionRandom : ("," + questionRandom)); } } } return(text); }
// Token: 0x0600002F RID: 47 RVA: 0x00003E04 File Offset: 0x00002004 public static string GetQuestionRandom(int channelid, int count, string type, string sidlist) { return(QuestionBll.GetQuestionRandom(channelid, count, type, sidlist, "")); }