public static int radioScore2(RadioLow rLow1, RadioLow rLow2, RadioLow rLow3, RadioLow rLow4, RadioLow rLow5, RadioButtonList rdolist1, RadioButtonList rdolist2, RadioButtonList rdolist3, RadioButtonList rdolist4, RadioButtonList rdolist5)
    {
        int score = 0;

        if (rdolist1.SelectedValue == rLow1.answer)
        {
            score += 10;
        }
        if (rdolist2.SelectedValue == rLow2.answer)
        {
            score += 10;
        }
        if (rdolist3.SelectedValue == rLow3.answer)
        {
            score += 10;
        }
        if (rdolist4.SelectedValue == rLow4.answer)
        {
            score += 10;
        }
        if (rdolist5.SelectedValue == rLow5.answer)
        {
            score += 10;
        }
        return(score);
    }
    public static RadioLow GetWrongLowRadio(int ID, string stuID, string sTable, string cTable)
    {
        SQLHelper dbAccess = new SQLHelper();    //实例化一个SQLHelper类
        string    sqlID    = "select * from[" + cTable + "]INNER JOIN [" + sTable + "] ON [" + cTable + "].Id = [" + sTable + "].Id AND [" + sTable + "].stuID='" + stuID + "' AND[" + sTable + "].Id = @Id";

        SqlParameter[] para = { new SqlParameter("@Id", ID) };    //利用参数para进行动态定义
        SqlDataReader  drID = dbAccess.GetDRWithPara(sqlID, para);

        if (drID.Read())
        {
            RadioLow rLow = new RadioLow();
            rLow.Id         = int.Parse(drID["Id"].ToString());
            rLow.question   = drID["question"].ToString();
            rLow.A          = drID["A"].ToString();
            rLow.B          = drID["B"].ToString();
            rLow.C          = drID["C"].ToString();
            rLow.D          = drID["D"].ToString();
            rLow.answer     = drID["answer"].ToString();
            rLow.explain    = drID["explain"].ToString();
            rLow.suggestion = int.Parse(drID["suggestion"].ToString());
            //关闭SqlDataReader对象,此时连接同时关闭
            drID.Close();
            return(rLow);
        }
        else
        {
            drID.Close();
            return(null);
        }
    }
    /// <summary>
    /// 从数据库中获取低级单选题记录
    /// </summary>
    public static RadioLow GetLowRadio(int Id)
    {
        SQLHelper dbAccess = new SQLHelper();                   //实例化一个SQLHelper类
        string    sql      = "Select * from [RadioLow] where Id = @Id";

        SqlParameter[] para = { new SqlParameter("@Id", Id) };       //利用参数para进行动态定义
        SqlDataReader  dr   = dbAccess.GetDRWithPara(sql, para);     //获取查询数据流

        //根据查询得到的数据,对成员赋值
        //数据流中是否有数据
        if (dr.Read())
        {
            RadioLow rLow = new RadioLow();
            rLow.Id         = int.Parse(dr["Id"].ToString());
            rLow.question   = dr["question"].ToString();
            rLow.A          = dr["A"].ToString();
            rLow.B          = dr["B"].ToString();
            rLow.C          = dr["C"].ToString();
            rLow.D          = dr["D"].ToString();
            rLow.answer     = dr["answer"].ToString();
            rLow.explain    = dr["explain"].ToString();
            rLow.suggestion = int.Parse(dr["suggestion"].ToString());

            //关闭SqlDataReader对象,此时连接同时关闭
            dr.Close();
            return(rLow);
        }
        else
        {
            dr.Close();
            return(null);
        }
    }
    public static bool radioTF(RadioLow rLow1, RadioButtonList rdolist1)
    {
        bool TF_1 = false;

        if (rdolist1.SelectedValue == rLow1.answer)
        {
            TF_1 = true;
        }
        return(TF_1);
    }
 //通过RadioButtonList控件显示低级选择题题目
 public static void ShowQuestionRadioLow(RadioLow rLow, RadioButtonList rdoList, Label lbl)
 {
     rdoList.Items[0].Text  = "A." + rLow.A;
     rdoList.Items[1].Text  = "B." + rLow.B;
     rdoList.Items[2].Text  = "C." + rLow.C;
     rdoList.Items[3].Text  = "D." + rLow.D;
     rdoList.Items[0].Value = "A";
     rdoList.Items[1].Value = "B";
     rdoList.Items[2].Value = "C";
     rdoList.Items[3].Value = "D";
     lbl.Text = rLow.question;
 }
    //清空题目
    public static void ClearQuestion(RadioLow rLow, RadioButtonList rdoList, Label lbl)
    {
        rdoList.Items[0].Text = "";
        rdoList.Items[1].Text = "";
        rdoList.Items[2].Text = "";
        rdoList.Items[3].Text = "";

        rdoList.Items[0].Value = "";
        rdoList.Items[1].Value = "";
        rdoList.Items[2].Value = "";
        rdoList.Items[3].Value = "";
        lbl.Text = "";
    }
 //单选题判定
 public static void JudgingRadio(RadioButtonList rdolist, RadioLow rLow, Label lbl, Button btn)
 {
     if (rdolist.SelectedValue == rLow.answer)
     {
         lbl.Text    = "恭喜你答对了!";
         btn.Visible = true;
     }
     else
     {
         lbl.Text    = "错误!正确答案:" + rLow.answer;
         btn.Visible = true;
     }
 }
    //单选题判定
    public static bool JudgingRadio(RadioButtonList rdolist, RadioLow rLow, Label lbl, Button btn)
    {
        bool correct;

        if (rdolist.SelectedValue == rLow.answer)
        {
            lbl.Text    = "恭喜你答对了!";
            btn.Visible = true;
            return(correct = true);
        }
        else
        {
            lbl.Text    = "错误!正确答案:" + rLow.answer;
            btn.Visible = true;
            return(correct = false);
        }
    }
Exemple #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["stuId"] != null)
         {
             int    score1 = 0;
             int    score2 = 0;
             string stuId  = Session["stuId"].ToString();
             stuNews1 = ClassUnitManager.GetStudyingInform(stuId);
             score1   = stuNews1.pretest; //获取前测分数
             score2   = stuNews1.low;     //获取初级测试分数
             //不是第一次做题,读取断点
             if (int.Parse(Request.QueryString["caid"].ToString().Trim()) == 1)
             {
                 BreakingPointRadio bpr = new BreakingPointRadio();
                 bpr   = BreakingPointManager.LoadBreakingPointRadio(Session["stuId"].ToString());
                 rLow1 = TestLowManager.GetLowRadio(bpr.r1);                   //读取用户单选题断点记录
                 TestLowManager.ShowQuestionRadioLow(rLow1, rdolistS1, lblS1); //显示单选题题目
                 rLow2 = TestLowManager.GetLowRadio(bpr.r2);
                 TestLowManager.ShowQuestionRadioLow(rLow2, rdolistS2, lblS2);
                 rLow3 = TestLowManager.GetLowRadio(bpr.r3);
                 TestLowManager.ShowQuestionRadioLow(rLow3, rdolistS3, lblS3);
                 rLow4 = TestLowManager.GetLowRadio(bpr.r4);
                 TestLowManager.ShowQuestionRadioLow(rLow4, rdolistS4, lblS4);
                 rLow5 = TestLowManager.GetLowRadio(bpr.r5);
                 TestLowManager.ShowQuestionRadioLow(rLow5, rdolistS5, lblS5);
                 BreakingPointJudge bpj = new BreakingPointJudge();
                 bpj   = BreakingPointManager.LoadBreakingPointJudge(Session["stuId"].ToString());
                 jLow1 = TestLowManager.GetLowJudge(bpj.j1);                   //读取用户判断题断点记录
                 TestLowManager.ShowQuestionJudgeLow(jLow1, rdolistJ1, lblJ1); //显示判断题题目
                 jLow2 = TestLowManager.GetLowJudge(bpj.j2);
                 TestLowManager.ShowQuestionJudgeLow(jLow2, rdolistJ2, lblJ2);
                 jLow3 = TestLowManager.GetLowJudge(bpj.j3);
                 TestLowManager.ShowQuestionJudgeLow(jLow3, rdolistJ3, lblJ3);
                 jLow4 = TestLowManager.GetLowJudge(bpj.j4);
                 TestLowManager.ShowQuestionJudgeLow(jLow4, rdolistJ4, lblJ4);
                 BreakingPointBlank bpb = new BreakingPointBlank();
                 bpb   = BreakingPointManager.LoadBreakingPointBlank(Session["stuId"].ToString());
                 bLow1 = TestLowManager.GetLowBlank(bpb.b1);                //读取用户填空题断点记录
                 TestLowManager.ShowQuestionBlankLow(bLow1, lblB1, lblB12); //显示填空题题目
                 bLow2 = TestLowManager.GetLowBlank(bpb.b2);
                 TestLowManager.ShowQuestionBlankLow(bLow2, lblB2, lblB22);
                 bLow3 = TestLowManager.GetLowBlank(bpb.b3);
                 TestLowManager.ShowQuestionBlankLow(bLow3, lblB3, lblB32);
                 BreakingPointDesign bpd = new BreakingPointDesign();
                 bpd   = BreakingPointManager.LoadBreakingPointDesign(Session["stuId"].ToString());
                 dLow1 = TestLowManager.GetLowDesign(bpd.d1);                                                          //读取用户设计题断点记录
                 TestLowManager.ShowQuestionDesignLow(dLow1, lblD1, lblD1S1, lblD1S2, rdolistD1S1, rdolistD1S2);       //显示填空题题目
                 TestLowManager.ShowRadioLowBreakingpoint(bpr, rdolistS1, rdolistS2, rdolistS3, rdolistS4, rdolistS5); //显示单选题的断点自选选项
                 TestLowManager.ShowJudgeLowBreakingpoint(bpj, rdolistJ1, rdolistJ2, rdolistJ3, rdolistJ4);            //显示判断题的断点自选选项
                 TestLowManager.ShowBlankLowBreakingpoint(bpb, txtB11, txtB21, txtB31);                                //显示填空题的断点自选选项
             }
             //第一次做题
             else if (int.Parse(Request.QueryString["caid"].ToString().Trim()) == 0)
             {
                 //判断前测分数是否到60分
                 if (score1 >= 60)
                 {
                     //随机出题(加入错题的权重,原先的题号不变,多余的错题作为普通题目放到最后进行随机)
                     long   tick  = DateTime.Now.Ticks;
                     Random ran   = new Random((int)(tick & 0xffffffffL) | (int)(tick >> 32));
                     int    iDown = 1;
                     int    iUp   = TestLowManager.CountRadioLow();
                     int[]  rr    = new int[iUp + 1];
                     for (int mn = 1; mn <= TestLowManager.CountRadioLow(); mn++)
                     {
                         rr[mn] = WrongRadioManager.WrongRadionum(Session["stuId"].ToString(), mn, "Low", "WrongRadio");
                         iUp    = iUp + rr[mn];
                     }
                     int[] n = new int[5];
                     while (true)
                     {
                         int i;
                         n[0] = ran.Next(iDown, iUp);
                         n[1] = ran.Next(iDown, iUp);
                         n[2] = ran.Next(iDown, iUp);
                         n[3] = ran.Next(iDown, iUp);
                         n[4] = ran.Next(iDown, iUp);
                         //对随机选出的5个数重映射题号
                         for (i = 0; i <= 4; i++)
                         {
                             if (n[i] > TestLowManager.CountRadioLow())
                             {
                                 int temp;
                                 temp = n[i] - TestLowManager.CountRadioLow();
                                 int p;
                                 for (p = 1; p <= TestLowManager.CountRadioLow(); p++)
                                 {
                                     temp = temp - rr[p];
                                     if (temp <= 0)
                                     {
                                         break;
                                     }
                                 }
                                 n[i] = p;
                             }
                         }
                         //题目不重复
                         if (n[0] != n[1] && n[0] != n[2] && n[0] != n[3] && n[0] != n[4] && n[1] != n[2] && n[1] != n[3] && n[1] != n[4] && n[2] != n[3] && n[2] != n[4] && n[3] != n[4])
                         {
                             i = 4;
                         }
                         if (i == 4)
                         {
                             break;
                         }
                     }
                     rLow1 = TestLowManager.GetLowRadio(n[0]);                     //获取判断题题目
                     TestLowManager.ShowQuestionRadioLow(rLow1, rdolistS1, lblS1); //显示判断题题目
                     rLow2 = TestLowManager.GetLowRadio(n[1]);
                     TestLowManager.ShowQuestionRadioLow(rLow2, rdolistS2, lblS2);
                     rLow3 = TestLowManager.GetLowRadio(n[2]);
                     TestLowManager.ShowQuestionRadioLow(rLow3, rdolistS3, lblS3);
                     rLow4 = TestLowManager.GetLowRadio(n[3]);
                     TestLowManager.ShowQuestionRadioLow(rLow4, rdolistS4, lblS4);
                     rLow5 = TestLowManager.GetLowRadio(n[4]);
                     TestLowManager.ShowQuestionRadioLow(rLow5, rdolistS5, lblS5);
                     //随机出题
                     int   iUp1 = TestLowManager.CountJudgeLow();
                     int[] jj   = new int[iUp1 + 1];
                     for (int mn = 1; mn <= TestLowManager.CountJudgeLow(); mn++)
                     {
                         jj[mn] = WrongRadioManager.WrongRadionum(Session["stuId"].ToString(), mn, "Low", "WrongJudge");
                         iUp1   = iUp1 + jj[mn];
                     }
                     int[] j = new int[4];
                     while (true)
                     {
                         int i;
                         j[0] = ran.Next(iDown, iUp1);
                         j[1] = ran.Next(iDown, iUp1);
                         j[2] = ran.Next(iDown, iUp1);
                         j[3] = ran.Next(iDown, iUp1);
                         //对随机选出的4个数重映射题号
                         for (i = 0; i <= 3; i++)
                         {
                             if (j[i] > TestLowManager.CountJudgeLow())
                             {
                                 int temp;
                                 temp = j[i] - TestLowManager.CountJudgeLow();
                                 int p;
                                 for (p = 1; p <= TestLowManager.CountJudgeLow(); p++)
                                 {
                                     temp = temp - jj[p];
                                     if (temp <= 0)
                                     {
                                         break;
                                     }
                                 }
                                 j[i] = p;
                             }
                         }
                         if (j[0] != j[1] && j[0] != j[2] && j[0] != j[3] && j[1] != j[2] && j[1] != j[3] && j[2] != j[3])
                         {
                             i = 3;
                         }
                         if (i == 3)
                         {
                             break;
                         }
                     }
                     jLow1 = TestLowManager.GetLowJudge(j[0]);
                     TestLowManager.ShowQuestionJudgeLow(jLow1, rdolistJ1, lblJ1);
                     jLow2 = TestLowManager.GetLowJudge(j[1]);
                     TestLowManager.ShowQuestionJudgeLow(jLow2, rdolistJ2, lblJ2);
                     jLow3 = TestLowManager.GetLowJudge(j[2]);
                     TestLowManager.ShowQuestionJudgeLow(jLow3, rdolistJ3, lblJ3);
                     jLow4 = TestLowManager.GetLowJudge(j[3]);
                     TestLowManager.ShowQuestionJudgeLow(jLow4, rdolistJ4, lblJ4);
                     //随机出题
                     int   iUp2 = TestLowManager.CountBlankLow();
                     int[] kk   = new int[iUp2 + 1];
                     for (int mn = 1; mn <= TestLowManager.CountBlankLow(); mn++)
                     {
                         kk[mn] = WrongRadioManager.WrongRadionum(Session["stuId"].ToString(), mn, "Low", "WrongBlank");
                         iUp2   = iUp2 + kk[mn];
                     }
                     int[] k = new int[3];
                     while (true)
                     {
                         int i;
                         k[0] = ran.Next(iDown, iUp2);
                         k[1] = ran.Next(iDown, iUp2);
                         k[2] = ran.Next(iDown, iUp2);
                         //对随机选出的3个数重映射题号
                         for (i = 0; i <= 2; i++)
                         {
                             if (k[i] > TestLowManager.CountBlankLow())
                             {
                                 int temp;
                                 temp = k[i] - TestLowManager.CountBlankLow();
                                 int p;
                                 for (p = 1; p <= TestLowManager.CountBlankLow(); p++)
                                 {
                                     temp = temp - kk[p];
                                     if (temp <= 0)
                                     {
                                         break;
                                     }
                                 }
                                 k[i] = p;
                             }
                         }
                         if (k[0] != k[1] && k[0] != k[2] && k[1] != k[2])
                         {
                             i = 2;
                         }
                         if (i == 2)
                         {
                             break;
                         }
                     }
                     bLow1 = TestLowManager.GetLowBlank(k[0]);
                     TestLowManager.ShowQuestionBlankLow(bLow1, lblB1, lblB12);
                     bLow2 = TestLowManager.GetLowBlank(k[1]);
                     TestLowManager.ShowQuestionBlankLow(bLow2, lblB2, lblB22);
                     bLow3 = TestLowManager.GetLowBlank(k[2]);
                     TestLowManager.ShowQuestionBlankLow(bLow3, lblB3, lblB32);
                     //随机出题
                     int   iUp3 = TestLowManager.CountDesignlow();
                     int[] m    = new int[2];
                     m[0]  = ran.Next(iDown, iUp3);
                     dLow1 = TestLowManager.GetLowDesign(m[0]);
                     TestLowManager.ShowQuestionDesignLow(dLow1, lblD1, lblD1S1, lblD1S2, rdolistD1S1, rdolistD1S2);
                 }
                 else
                 {
                     lblTitle.Visible    = false;
                     PanelAll.Visible    = false;
                     PanelDesign.Visible = false;
                     btnSubmit.Visible   = false;
                     btnOk.Visible       = false;
                     btnSave.Visible     = false;
                     //Response.Write("<script type = 'text/javascript'> alert('你未通过前测,不能进行该等级测试!'); </script>");
                     RegisterClientScriptBlock("", "<script>alert('你未通过前测,不能进行初级测试!')</script>");
                 }
             }
         }
         else
         {
             Response.Redirect("Login.aspx");
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["stuId"] != null)
         {
             //随机出题
             long   tick  = DateTime.Now.Ticks;
             Random ran   = new Random((int)(tick & 0xffffffffL) | (int)(tick >> 32));
             int    iDown = 1;
             int    iUp   = TestLowManager.CountRadioLow();
             int[]  n     = new int[5];
             while (true)
             {
                 int i = 0;
                 n[0] = ran.Next(iDown, iUp);
                 n[1] = ran.Next(iDown, iUp);
                 n[2] = ran.Next(iDown, iUp);
                 n[3] = ran.Next(iDown, iUp);
                 n[4] = ran.Next(iDown, iUp);
                 if (n[0] != n[1] && n[0] != n[2] && n[0] != n[3] && n[0] != n[4] && n[1] != n[2] && n[1] != n[3] && n[1] != n[4] && n[2] != n[3] && n[2] != n[4] && n[3] != n[4])
                 {
                     i = 4;
                 }
                 if (i == 4)
                 {
                     break;
                 }
             }
             rLow1 = TestLowManager.GetLowRadio(n[0]);
             TestLowManager.ShowQuestionRadioLow(rLow1, rdolistS1, lblS1);
             rLow2 = TestLowManager.GetLowRadio(n[1]);
             TestLowManager.ShowQuestionRadioLow(rLow2, rdolistS2, lblS2);
             rLow3 = TestLowManager.GetLowRadio(n[2]);
             TestLowManager.ShowQuestionRadioLow(rLow3, rdolistS3, lblS3);
             rLow4 = TestLowManager.GetLowRadio(n[3]);
             TestLowManager.ShowQuestionRadioLow(rLow4, rdolistS4, lblS4);
             rLow5 = TestLowManager.GetLowRadio(n[4]);
             TestLowManager.ShowQuestionRadioLow(rLow5, rdolistS5, lblS5);
             //随机出题
             int   iUp1 = TestLowManager.CountJudgeLow();
             int[] j    = new int[4];
             while (true)
             {
                 int i = 0;
                 j[0] = ran.Next(iDown, iUp1);
                 j[1] = ran.Next(iDown, iUp1);
                 j[2] = ran.Next(iDown, iUp1);
                 j[3] = ran.Next(iDown, iUp1);
                 if (j[0] != j[1] && j[0] != j[2] && j[0] != j[3] && j[1] != j[2] && j[1] != j[3] && j[2] != j[3])
                 {
                     i = 3;
                 }
                 if (i == 3)
                 {
                     break;
                 }
             }
             jLow1 = TestLowManager.GetLowJudge(j[0]);
             TestLowManager.ShowQuestionJudgeLow(jLow1, rdolistJ1, lblJ1);
             jLow2 = TestLowManager.GetLowJudge(j[1]);
             TestLowManager.ShowQuestionJudgeLow(jLow2, rdolistJ2, lblJ2);
             jLow3 = TestLowManager.GetLowJudge(j[2]);
             TestLowManager.ShowQuestionJudgeLow(jLow3, rdolistJ3, lblJ3);
             jLow4 = TestLowManager.GetLowJudge(j[3]);
             TestLowManager.ShowQuestionJudgeLow(jLow4, rdolistJ4, lblJ4);
             //随机出题
             int   iUp2 = TestLowManager.CountBlankLow();
             int[] k    = new int[3];
             while (true)
             {
                 int i = 0;
                 k[0] = ran.Next(iDown, iUp2);
                 k[1] = ran.Next(iDown, iUp2);
                 k[2] = ran.Next(iDown, iUp2);
                 if (k[0] != k[1] && k[0] != k[2] && k[1] != k[2])
                 {
                     i = 2;
                 }
                 if (i == 2)
                 {
                     break;
                 }
             }
             bLow1 = TestLowManager.GetLowBlank(k[0]);
             TestLowManager.ShowQuestionBlankLow(bLow1, lblB1, lblB12);
             bLow2 = TestLowManager.GetLowBlank(k[1]);
             TestLowManager.ShowQuestionBlankLow(bLow2, lblB2, lblB22);
             bLow3 = TestLowManager.GetLowBlank(k[2]);
             TestLowManager.ShowQuestionBlankLow(bLow3, lblB3, lblB32);
             //随机出题
             int   iUp3 = TestLowManager.CountDesignlow();
             int[] m    = new int[2];
             m[0]  = ran.Next(iDown, iUp3);
             dLow1 = TestLowManager.GetLowDesign(m[0]);
             TestLowManager.ShowQuestionDesignLow2(dLow1, lblD1);
         }
         else
         {
             Response.Redirect("Login.aspx");
         }
     }
 }
Exemple #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["stuId"] != null)
         {
             int    score1 = 0;
             string stuId  = Session["stuId"].ToString();
             stuNews1 = ClassUnitManager.GetStudyingInform(stuId); //获取学生各部分成绩
             score1   = stuNews1.pretest;                          //获取前测分数
             //判断前测分数是否到60分
             if (score1 < 60)
             {
                 //随机出题
                 long   tick  = DateTime.Now.Ticks;
                 Random ran   = new Random((int)(tick & 0xffffffffL) | (int)(tick >> 32));
                 int    iDown = 1;
                 int    iUp   = TestLowManager.CountRadioLow();
                 int[]  n     = new int[5];
                 while (true)
                 {
                     int i = 0;
                     n[0] = ran.Next(iDown, iUp);
                     n[1] = ran.Next(iDown, iUp);
                     n[2] = ran.Next(iDown, iUp);
                     n[3] = ran.Next(iDown, iUp);
                     n[4] = ran.Next(iDown, iUp);
                     //题目不重复
                     if (n[0] != n[1] && n[0] != n[2] && n[0] != n[3] && n[0] != n[4] && n[1] != n[2] && n[1] != n[3] && n[1] != n[4] && n[2] != n[3] && n[2] != n[4] && n[3] != n[4])
                     {
                         i = 4;
                     }
                     if (i == 4)
                     {
                         break;
                     }
                 }
                 rLow1 = TestLowManager.GetLowRadio(n[0]);                     //获取前测单选题题目
                 TestLowManager.ShowQuestionRadioLow(rLow1, rdolistS1, lblS1); //显示单选题题目
                 rLow2 = TestLowManager.GetLowRadio(n[1]);
                 TestLowManager.ShowQuestionRadioLow(rLow2, rdolistS2, lblS2);
                 rLow3 = TestLowManager.GetLowRadio(n[2]);
                 TestLowManager.ShowQuestionRadioLow(rLow3, rdolistS3, lblS3);
                 rLow4 = TestLowManager.GetLowRadio(n[3]);
                 TestLowManager.ShowQuestionRadioLow(rLow4, rdolistS4, lblS4);
                 rLow5 = TestLowManager.GetLowRadio(n[4]);
                 TestLowManager.ShowQuestionRadioLow(rLow5, rdolistS5, lblS5);
                 //随机出题
                 int   iUp1 = TestLowManager.CountJudgeLow();
                 int[] j    = new int[5];
                 while (true)
                 {
                     int i = 0;
                     j[0] = ran.Next(iDown, iUp1);
                     j[1] = ran.Next(iDown, iUp1);
                     j[2] = ran.Next(iDown, iUp1);
                     j[3] = ran.Next(iDown, iUp1);
                     j[4] = ran.Next(iDown, iUp1);
                     if (j[0] != j[1] && j[0] != j[2] && j[0] != j[3] && j[0] != j[4] && j[1] != j[2] && j[1] != j[3] && j[1] != j[4] && j[2] != j[3] && j[2] != j[4] && j[3] != j[4])
                     {
                         i = 4;
                     }
                     if (i == 4)
                     {
                         break;
                     }
                 }
                 jLow1 = TestLowManager.GetLowJudge(j[0]);                     //获取前测判断题题目
                 TestLowManager.ShowQuestionJudgeLow(jLow1, rdolistJ1, lblJ1); //显示判断题题目
                 jLow2 = TestLowManager.GetLowJudge(j[1]);
                 TestLowManager.ShowQuestionJudgeLow(jLow2, rdolistJ2, lblJ2);
                 jLow3 = TestLowManager.GetLowJudge(j[2]);
                 TestLowManager.ShowQuestionJudgeLow(jLow3, rdolistJ3, lblJ3);
                 jLow4 = TestLowManager.GetLowJudge(j[3]);
                 TestLowManager.ShowQuestionJudgeLow(jLow4, rdolistJ4, lblJ4);
                 jLow5 = TestLowManager.GetLowJudge(j[4]);
                 TestLowManager.ShowQuestionJudgeLow(jLow5, rdolistJ5, lblJ5);
             }
             //判断前测分数是否在60至75分之间
             else if (score1 >= 60 && score1 < 75)
             {
                 lblTitle.Visible = false;
                 PanelAll.Visible = false;
                 btnOk.Visible    = false;
                 Response.Write("<script type = 'text/javascript'> alert('你已通过前测,可直接进入低级测试单元!'); </script>");
                 //RegisterClientScriptBlock("", string.Format("<script type = 'text/javascript'>  alert('你已通过前测,可直接进入低级测试单元!');location.href= 'TestLow.aspx?caid=0'</script>"));
             }
             //判断前测分数是否在75至90分之间
             else if (score1 >= 75 && score1 < 90)
             {
                 lblTitle.Visible = false;
                 PanelAll.Visible = false;
                 btnOk.Visible    = false;
                 //Response.Write("<script type = 'text/javascript'> alert('你已通过前测,可直接进入中级测试单元!'); </script>");
                 RegisterClientScriptBlock("", "<script>alert('你已通过前测,可直接进入中级测试单元!')</script>");
                 //RegisterClientScriptBlock("", string.Format("<script type = 'text/javascript'>  alert('你已通过前测,可直接进入中级测试单元!');location.href= 'TestMid.aspx?caid=0'</script>"));
             }
             else
             {
                 lblTitle.Visible = false;
                 PanelAll.Visible = false;
                 btnOk.Visible    = false;
                 //Response.Write("<script type = 'text/javascript'> alert('你已通过前测,可直接进入高级测试单元!'); </script>");
                 RegisterClientScriptBlock("", "<script>alert('你已通过前测,可直接进入高级测试单元!')</script>");
                 //RegisterClientScriptBlock("", string.Format("<script type = 'text/javascript'>  alert('你已通过前测,可直接进入高级测试单元!');location.href= 'TestHigh.aspx?caid=0'</script>"));
             }
         }
         else
         {
             Response.Redirect("Login.aspx");
         }
     }
 }