Ejemplo n.º 1
0
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            this.labelTitle.Text = "即将考试";
            Grid1.Visible        = false;
            Grid2.Visible        = true;
            Grid3.Visible        = false;
            Grid4.Visible        = false;
            string  struesrId = PrjPub.StudentID;
            ExamBLL bkLL      = new ExamBLL();
            IList <RailExam.Model.Exam> ExamList1 = bkLL.GetComingExamByUserId(struesrId);

            this.Grid2.DataSource = ExamList1;
            this.Grid2.DataBind();
        }
Ejemplo n.º 2
0
        private void BindGrid()
        {
            GridView2.DataBind();

            if (PrjPub.StudentID != null && PrjPub.StudentID != "")
            {
                string  struesrId = PrjPub.StudentID;
                ExamBLL bkLL      = new ExamBLL();
                IList <RailExam.Model.Exam> ExamList = bkLL.GetExamByUserId(struesrId, 0, PrjPub.ServerNo);
                this.GridView4.DataSource = ExamList;
                this.GridView4.DataBind();



                //即将考试
                IList <RailExam.Model.Exam> ExamList1 = bkLL.GetComingExamByUserId(struesrId);

                this.GridView3.DataSource = ExamList1;
                this.GridView3.DataBind();

                //历史考试
                IList <RailExam.Model.Exam> ExamList2 = bkLL.GetHistoryExamByUserId(struesrId);
                this.GridView5.DataSource = ExamList2;
                this.GridView5.DataBind();

                gvExamResult.Visible = true;
            }
            else
            {
                ExamBLL bkLL = new ExamBLL();
                IList <RailExam.Model.Exam> ExamList = bkLL.GetNowExam();
                this.GridView4.DataSource = ExamList;
                this.GridView4.DataBind();

                IList <RailExam.Model.Exam> ExamList1 = bkLL.GetComingExam();
                this.GridView3.DataSource = ExamList1;
                this.GridView3.DataBind();

                IList <RailExam.Model.Exam> ExamList2 = bkLL.GetHistoryExam();
                this.GridView5.DataSource = ExamList2;
                this.GridView5.DataBind();
                gvExamResult.Visible = false;
            }
        }