示例#1
0
        public void FillPage()
        {
            int orgID;

            if (PrjPub.IsServerCenter)
            {
                orgID = 0;
            }
            else
            {
                orgID = Convert.ToInt32(ConfigurationManager.AppSettings["StationID"]);
            }

            if (hfEmployeeID.Value != string.Empty)
            {
                ExamBLL bkLL = new ExamBLL();
                IList <RailExam.Model.Exam> ExamList = bkLL.GetExamByUserId(hfEmployeeID.Value, orgID, PrjPub.ServerNo);

                string str = "";

                foreach (RailExam.Model.Exam exam in ExamList)
                {
                    str +=
                        "<tr><td align='center' style='border: solid 1px #E0E0E0;padding: 5px;white-space:nowrap;'><a onclick=AttendExam('" +
                        exam.ExamId + "','" + exam.paperId + "','" + exam.ExamType +
                        "') href=# title='参加考试' style='font-size:x-large;color: red;cursor:hand; font-weight:bold;text-decoration: underline'> " +
                        exam.ExamName + " </a></td>";

                    str += "<td align='center' style='border: solid 1px #E0E0E0;padding: 5px;white-space:nowrap;'>" +
                           exam.BeginTime.ToString("f") + "——" + exam.EndTime.ToString("f") + "</td></tr>";
                }

                Response.Write(str);
            }
        }
示例#2
0
        protected void ImageButton0_Click(object sender, ImageClickEventArgs e)
        {
            this.labelTitle.Text = "当前考试";
            Grid1.Visible        = true;
            Grid2.Visible        = false;
            Grid3.Visible        = false;
            Grid4.Visible        = false;

            string  struesrId = PrjPub.StudentID;
            ExamBLL bkLL      = new ExamBLL();
            IList <RailExam.Model.Exam> ExamList = bkLL.GetExamByUserId(struesrId, 0, PrjPub.ServerNo);

            this.Grid1.DataSource = ExamList;
            this.Grid1.DataBind();
        }
示例#3
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;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack && !CallBack1.IsCallback)
            {
                string struesrId = PrjPub.StudentID;
                hfEmployeeID.Value = struesrId;
                try
                {
                    lblName.Text = PrjPub.CurrentStudent.EmployeeName;
                }
                catch
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=超时时间已到,请重新登录");
                }
                OrganizationBLL objOrgBll = new OrganizationBLL();
                lblOrg.Text  = objOrgBll.GetOrganization(PrjPub.CurrentStudent.StationOrgID).ShortName;
                lblPost.Text = PrjPub.CurrentStudent.PostName;

                int orgID;
                if (PrjPub.IsServerCenter)
                {
                    orgID = 0;
                }
                else
                {
                    orgID = Convert.ToInt32(ConfigurationManager.AppSettings["StationID"]);
                }
                ExamBLL bkLL = new ExamBLL();
                IList <RailExam.Model.Exam> ExamList = bkLL.GetExamByUserId(struesrId, orgID, PrjPub.ServerNo);
                foreach (RailExam.Model.Exam exam in ExamList)
                {
                    exam.ExamName = "<a onclick=AttendExam('" + exam.ExamId + "','" + exam.paperId + "','" + exam.ExamType + "') href=# title='参加考试' > " + exam.ExamName + " </a>";
                }
                gvExam.DataSource = ExamList;
                gvExam.DataBind();
            }
        }