// Token: 0x060000CE RID: 206 RVA: 0x0001462C File Offset: 0x0001282C protected override void View() { this.channelinfo = ChannelBll.GetChannelInfo("exam_question"); if (this.channelinfo.id == 0) { this.ShowErr("对不起,目前系统尚未创建题目库频道。"); } else { string commandText = string.Format("SELECT SUM([curfavs]) AS [total] FROM [{0}Exam_ExamLogInfo] WHERE [channelid]={1} AND [uid]={2}", DbConfigs.Prefix, this.channelinfo.id, this.userid); this.total = FPUtils.StrToInt(DbHelper.ExecuteScalar(commandText)); this.userexamlog = ExamBll.GetExamLogList(this.channelinfo.id, this.userid); List <SortAppInfo> sortAppList = SortBll.GetSortAppList("exam_"); foreach (SortAppInfo sortAppInfo in sortAppList) { if (this.sortappidlist != "") { this.sortappidlist += ","; } this.sortappidlist += sortAppInfo.id; } SqlParam[] sqlparams = new SqlParam[] { DbHelper.MakeAndWhere("parentid", 0), DbHelper.MakeAndWhere("channelid", this.channelinfo.id), DbHelper.MakeAndWhere("appid", WhereType.In, this.sortappidlist), DbHelper.MakeAndWhere("hidden", 0) }; OrderByParam orderby = DbHelper.MakeOrderBy("display", OrderBy.ASC); List <SortInfo> list = DbHelper.ExecuteList <SortInfo>(orderby, sqlparams); foreach (SortInfo sortInfo in list) { ExamLogInfo examLogInfo; if (this.userexamlog.ContainsKey(sortInfo.id)) { examLogInfo = this.userexamlog[sortInfo.id]; } else { examLogInfo = new ExamLogInfo(); } examLogInfo.sortid = sortInfo.id; examLogInfo.sortname = sortInfo.name; examLogInfo.questions = sortInfo.posts; examLogInfo.subcounts = sortInfo.subcounts; this.examloglist.Add(examLogInfo); } } }
// Token: 0x060000E6 RID: 230 RVA: 0x00016C80 File Offset: 0x00014E80 protected override void View() { this.examconfig = ExamConifgs.GetExamConfig(); this.channelinfo = ChannelBll.GetChannelInfo("exam_question"); if (this.channelinfo.id == 0) { this.ShowErr("对不起,目前系统尚未创建题目库频道。"); } else { List <SortAppInfo> sortAppList = SortBll.GetSortAppList("exam_"); string text = ""; foreach (SortAppInfo sortAppInfo in sortAppList) { if (text != "") { text += ","; } text += sortAppInfo.id; } this.zNodes = this.GetSortTree(this.channelinfo.id, 0, text); } }
// Token: 0x060000BD RID: 189 RVA: 0x00012850 File Offset: 0x00010A50 protected override void View() { this.channelinfo = ChannelBll.GetChannelInfo("exam_question"); if (this.channelinfo.id == 0) { this.ShowErr("对不起,目前系统尚未创建题目库频道。"); } else { string sqlstring = string.Format("SELECT COUNT([uid]) FROM (SELECT DISTINCT [uid] FROM [{0}Exam_ExamResult] WHERE [channelid]={1} AND [status]>0) AS TA", DbConfigs.Prefix, this.channelinfo.id); this.examusers = this.GetScalarTotal(sqlstring); sqlstring = string.Format("SELECT AVG([score]) FROM [{0}Exam_ExamResult] WHERE [channelid]={1} AND [uid]={2} AND [status]>0", DbConfigs.Prefix, this.channelinfo.id, this.userid); this.avg_my = this.GetScalarTotal(sqlstring); sqlstring = string.Format("SELECT AVG([score]) FROM [{0}Exam_ExamResult] WHERE [channelid]={1} AND [status]>0", DbConfigs.Prefix, this.channelinfo.id); this.avg_total = this.GetScalarTotal(sqlstring); sqlstring = string.Format("SELECT COUNT(*) FROM (SELECT [uid],AVG([score]) AS [scoreavg] FROM [{0}Exam_ExamResult] WHERE [channelid]={1} AND [status]>0 GROUP BY [uid]) AS TA WHERE [scoreavg]>{2}", DbConfigs.Prefix, this.channelinfo.id, this.avg_my); this.avg_display = FPUtils.StrToInt(this.GetScalarTotal(sqlstring)) + 1; sqlstring = string.Format("SELECT SUM([answers]) AS [answers],SUM([wrongs]) AS [wrongs] FROM [{0}Exam_ExamLogInfo] WHERE [channelid]={1}", DbConfigs.Prefix, this.channelinfo.id); ExamLogInfo examLogInfo = this.GetExamLogInfo(sqlstring); this.accuracy_total = examLogInfo.accuracy; sqlstring = string.Format("SELECT SUM([answers]) AS [answers],SUM([wrongs]) AS [wrongs] FROM [{0}Exam_ExamLogInfo] WHERE [channelid]={1} AND [uid]={2}", DbConfigs.Prefix, this.channelinfo.id, this.userid); examLogInfo = this.GetExamLogInfo(sqlstring); this.accuracy_my = examLogInfo.accuracy; sqlstring = string.Format("SELECT COUNT(*) FROM (SELECT [uid],SUM(wrongs) AS [wrongs] FROM [{0}Exam_ExamLogInfo] WHERE [channelid]={1} GROUP BY [uid]) AS TA WHERE [wrongs]<{2}", DbConfigs.Prefix, this.channelinfo.id, examLogInfo.wrongs); this.accuracy_display = FPUtils.StrToInt(this.GetScalarTotal(sqlstring)) + 1; SqlParam[] sqlparams = new SqlParam[] { DbHelper.MakeAndWhere("channelid", this.channelinfo.id), DbHelper.MakeAndWhere("status", WhereType.GreaterThan, 0), DbHelper.MakeAndWhere("uid", this.userid) }; List <ExamResult> list = DbHelper.ExecuteList <ExamResult>(OrderBy.ASC, sqlparams); int num = 1; foreach (ExamResult examResult in list) { if (this.examresult != "") { this.examresult += ","; } this.examresult += string.Format("['', {0}]", examResult.score); num++; } this.userexamlog = ExamBll.GetExamLogList(this.channelinfo.id, this.userid); List <SortAppInfo> sortAppList = SortBll.GetSortAppList("exam_"); foreach (SortAppInfo sortAppInfo in sortAppList) { if (this.sortappidlist != "") { this.sortappidlist += ","; } this.sortappidlist += sortAppInfo.id; } SqlParam[] sqlparams2 = new SqlParam[] { DbHelper.MakeAndWhere("parentid", 0), DbHelper.MakeAndWhere("channelid", this.channelinfo.id), DbHelper.MakeAndWhere("appid", WhereType.In, this.sortappidlist), DbHelper.MakeAndWhere("hidden", 0) }; OrderByParam orderby = DbHelper.MakeOrderBy("display", OrderBy.ASC); List <SortInfo> list2 = DbHelper.ExecuteList <SortInfo>(orderby, sqlparams2); foreach (SortInfo sortInfo in list2) { if (this.userexamlog.ContainsKey(sortInfo.id)) { examLogInfo = this.userexamlog[sortInfo.id]; } else { examLogInfo = new ExamLogInfo(); } examLogInfo.sortid = sortInfo.id; examLogInfo.sortname = sortInfo.name; examLogInfo.questions = sortInfo.posts; examLogInfo.subcounts = sortInfo.subcounts; this.examloglist.Add(examLogInfo); } } }