case "2":
if (Request["radio_"
+ dr["Exam_Question_Id"].ToString()] != null)
{
listUserQuestion.Add(new ExamOnline.Model.admin.ExamManage.Exam_UserQuestion()
{
Exam_TestPaperDetail_Id = Convert.ToInt32(dr["Exam_TestPaperDetail_Id"].ToString()),
Exam_TestPaper_Id = paperId,
Exam_TestPaperDetail_Score = Convert.ToDecimal(dr["Exam_TestPaperDetail_Score"]),
Exam_UserQuestion_Evaluate = 1,
Exam_UserQuestion_Content = Request["radio_" + dr["Exam_Question_Id"].ToString()],
Exam_UserQuestion_Score = Request["radio_" + dr["Exam_Question_Id"].ToString()].ToString().Equals(dr["Exam_Question_RightAnswer"].ToString()) ? Convert.ToDecimal(dr["Exam_TestPaperDetail_Score"]) : 0
}
);
//错题本
if (!Request["radio_" + dr["Exam_Question_Id"].ToString()].ToString().Equals(dr["Exam_Question_RightAnswer"].ToString()))
{
listMistake.Add(
new ExamOnline.Model.admin.ExamManage.Exam_Mistake()
{
Exam_Question_Id = int.Parse(dr["Exam_Question_Id"].ToString()),
Exam_TestPaper_Id = paperId,
userid = new Model.admin.ExamManage.ProfileUserInfo().intUserID,
Exam_Mistake_Title = questiontpMap[dr["Exam_QuestionType_id"].ToString()].ToString() + questionSortMap[dr["Exam_Question_Order"].ToString()].ToString(),
Exam_Question_WrongtAnswer = Request["radio_" + dr["Exam_Question_Id"].ToString()],
Exam_Mistake_Time = DateTime.Now
}
);
}
else
{
rightCnt++;
}
//总分
UserPaper.Exam_UsePaper_Score += Request["radio_" + dr["Exam_Question_Id"].ToString()].ToString().Equals(dr["Exam_Question_RightAnswer"].ToString()) ? Convert.ToDecimal(dr["Exam_TestPaperDetail_Score"]) : 0;
}
else
{
listUserQuestion.Add(new ExamOnline.Model.admin.ExamManage.Exam_UserQuestion()
{
Exam_TestPaperDetail_Id = Convert.ToInt32(dr["Exam_TestPaperDetail_Id"].ToString()),
Exam_TestPaper_Id = paperId,
Exam_TestPaperDetail_Score = Convert.ToDecimal(dr["Exam_TestPaperDetail_Score"]),
Exam_UserQuestion_Evaluate = 1,
Exam_UserQuestion_Content = "",
Exam_UserQuestion_Score = 0
});
//错题本
listMistake.Add(
new ExamOnline.Model.admin.ExamManage.Exam_Mistake()
{
Exam_Question_Id = int.Parse(dr["Exam_Question_Id"].ToString()),
Exam_TestPaper_Id = paperId,
userid = new Model.admin.ExamManage.ProfileUserInfo().intUserID,
Exam_Mistake_Title = questiontpMap[dr["Exam_QuestionType_id"].ToString()].ToString() + questionSortMap[dr["Exam_Question_Order"].ToString()].ToString(),
Exam_Question_WrongtAnswer = "",
Exam_Mistake_Time = DateTime.Now
}
);
}
totalCnt++;
break;
我想把里面的HashTable 使用ArrayList 进行替换 从而 使用ArrayList 的Sort排序 根据 进来的数据顺序进行排序