예제 #1
0
        private void MyBind()
        {
            M_UserInfo mu = userBll.GetLogin();
            // if (mu.UserID < 1 || Mid < 1) { return; }
            M_Exam_Sys_Papers paperMod = paperBll.SelReturnModel(Mid);

            //M_Temp tempMod = tempBll.SelModelByUid(mu.UserID, 10);
            //ExTime = DataConverter.CLng(paperMod.p_UseTime);
            //if (tempMod == null || string.IsNullOrEmpty(tempMod.Str1)) { function.WriteErrMsg("试题篮为空,请先选择试题!"); }
            Title_L.Text = paperMod.p_name;
            //string ids = "";
            //DataTable dt = SqlHelper.ExecuteTable(CommandType.Text, "SELECT p_id FROM ZL_Exam_Sys_Questions");
            //foreach (DataRow dr in dt.Rows)
            //{
            //    ids += dr["p_id"] + ",";
            //}
            //ids = ids.TrimEnd(',');
            QuestDT = questBll.SelByIDSForExam(paperMod.QIDS, paperMod.id); //获取问题,自动组卷则筛选合适的IDS
                                                                            //QuestDT.DefaultView.RowFilter = "";
                                                                            //QuestDT_Hid.Value = JsonConvert.SerializeObject(QuestDT.DefaultView.ToTable(false, "p_id,p_title,p_type,p_defaultScores,istoshare,pid".Split(',')));
            DataTable typeDT = answerBll.GetTypeDT(QuestDT);

            MainRPT.DataSource = typeDT;
            MainRPT.DataBind();
        }
        private void MyBind()
        {
            M_Exam_Sys_Papers paperMod = paperBll.SelReturnModel(PaperID);

            Title_T.Text = paperMod.p_name;
            QuestDT      = questBll.SelByIDSForExam(paperMod.QIDS, PaperID);//获取问题,自动组卷则筛选合适的IDS
            if (QuestDT != null)
            {
                QuestDT.DefaultView.RowFilter = "";
                DataTable typeDT = answerBll.GetTypeDT(QuestDT);
                MainRPT.DataSource = typeDT;
                MainRPT.DataBind();
            }
        }