Пример #1
0
        public ActionResult SingleItemList()
        {
            List <WrongItemInfo> WrongItemList = new List <WrongItemInfo>();
            List <CEDTS_User>    StudList      = _user.SelectUserByClassID(ClassID);
            List <Guid>          TestIDList    = _paper.SelectTestIDListByPaperID(SinglePaperID);
            List <int>           StudIDList    = new List <int>();

            foreach (var stud in StudList)
            {
                StudIDList.Add(stud.UserID);
            }
            WrongItemList = _paper.SelectWIIByPUList(SinglePaperID, StudIDList);
            for (int i = 0; i < WrongItemList.Count; i++)
            {
                WrongItemList[i].ItemName = _paper.SelectItemType(WrongItemList[i].ItemTypeNum).TypeName_CN;
                List <QuestionDoneInfo> Qlist = _paper.SelectQDIByTUList(TestIDList, StudIDList, WrongItemList[i].ItemTypeNum);
                int Num = Qlist.Count < 3 ? Qlist.Count : 3;
                WrongItemList[i].WrongNum = new List <int>();
                for (int j = 0; j < Num; j++)
                {
                    WrongItemList[i].WrongNum.Add(Qlist[j].QuestionNum);
                }
            }
            return(PartialView(WrongItemList));
        }