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   = TestHighManager.CountRadio();
                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;
                    }
                }
                r1 = TestHighManager.GetRadio(n[0]);
                TestHighManager.ShowQuestionRadio(r1, rdolistS1, lblS1);
                r2 = TestHighManager.GetRadio(n[1]);
                TestHighManager.ShowQuestionRadio(r2, rdolistS2, lblS2);
                r3 = TestHighManager.GetRadio(n[2]);
                TestHighManager.ShowQuestionRadio(r3, rdolistS3, lblS3);
                r4 = TestHighManager.GetRadio(n[3]);
                TestHighManager.ShowQuestionRadio(r4, rdolistS4, lblS4);
                r5 = TestHighManager.GetRadio(n[4]);
                TestHighManager.ShowQuestionRadio(r5, rdolistS5, lblS5);

                //随机出题
                int   iUp1 = TestHighManager.CountJudge();
                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;
                    }
                }

                j1 = TestHighManager.GetJudge(j[0]);
                TestHighManager.ShowQuestionJudge(j1, rdolistJ1, lblJ1);
                j2 = TestHighManager.GetJudge(j[1]);
                TestHighManager.ShowQuestionJudge(j2, rdolistJ2, lblJ2);
                j3 = TestHighManager.GetJudge(j[2]);
                TestHighManager.ShowQuestionJudge(j3, rdolistJ3, lblJ3);
                j4 = TestHighManager.GetJudge(j[3]);
                TestHighManager.ShowQuestionJudge(j4, rdolistJ4, lblJ4);

                //随机出题
                int   iUp2 = TestHighManager.CountBlank();
                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;
                    }
                }

                b1 = TestHighManager.GetBlank(k[0]);
                TestHighManager.ShowQuestionBlank(b1, lblB1, lblB12);
                b2 = TestHighManager.GetBlank(k[1]);
                TestHighManager.ShowQuestionBlank(b2, lblB2, lblB22);
                b3 = TestHighManager.GetBlank(k[2]);
                TestHighManager.ShowQuestionBlank(b3, lblB3, lblB32);

                //随机出题
                int   iUp3 = TestHighManager.CountDesign();
                int[] m    = new int[2];
                m[0] = ran.Next(iDown, iUp3);

                d1 = TestHighManager.GetDesign(m[0]);
                TestHighManager.ShowQuestionDesign2(d1, lblD1);
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }
    }