コード例 #1
0
        //初始化编辑页面
        public void InitialNotifyEdit(int englishExamId)
        {
            UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
            DalOperationAboutEnglishExam dal = new DalOperationAboutEnglishExam();

            if (dal.CheckIsOverDateOrSignUpConfirm(UserCookiesInfo.userNo, englishExamId))
            {
                Javascript.AlertAndRedirect("您好,当前报名信息不能修改,可能的原因为:\n1. 已经过报名截止日期。2. 报名信息已经确认。\n如有疑问请发送疑问反馈,谢谢!", "/Student/EnglishExamSignUp.aspx?fragment=2", Page);
                return;
            }

            DataSet ds = dal.GetEnglishExamNotifyIngById(englishExamNotifyId);
            DataRowCollection drc = ds.Tables[0].Rows;

            if (drc.Count == 0)
            {
                Javascript.RefreshParentWindow("您好,当前无四六级报名信息!", "/Student/EnglishExamSignUp.aspx?fragment=2", Page);
                return;
            }

            for (int i = 0; i < 1; i++)
            {
                ddlEnglishExamNotify.Items.Add(new ListItem(drc[i]["englishExamNotifyTitle"].ToString().Trim(), drc[i]["englishExamNotifyId"].ToString().Trim()));
            }
            StudentsList studentList = dal.GetEnglishExamSignUpStudentInfoByStudentNo(UserCookiesInfo.userNo);

            ltlName.Text = studentList.studentName;
            ltlSex.Text = (studentList.Sex == 1 ? "女" : "男");
            ltlStudentNo.Text = studentList.studentNo;
            ltlCardType.Text = studentList.CardType;
            ltlCardNum.Text = studentList.CardNum;
            ltlMatriculationDate.Text = studentList.MatriculationDate.ToString("yyyy-MM-dd");
            ltlMajor.Text = studentList.studentSpeciality;
            ltlSchoolClass.Text = studentList.SchoolClassName;

            EnglishExam englishExam =  dal.GetEnglishExamSignUpInfoByStudentNo(UserCookiesInfo.userNo, englishExamId);

            if (englishExam.examType.Trim() == "四级")
            {
                ddlEnglishExamType.Items.Add(new ListItem("四级", "四级"));
                ddlEnglishExamType.Items.Add(new ListItem("六级", "六级"));
            }
            else if (englishExam.examType.Trim() == "六级")
            {
                ddlEnglishExamType.Items.Add(new ListItem("六级", "六级"));
                ddlEnglishExamType.Items.Add(new ListItem("四级", "四级"));
            }

            if (englishExam.examPlace.Trim() == "合肥")
            {
                ddlEnglishExamPlace.Items.Add(new ListItem("合肥", "合肥"));
                ddlEnglishExamPlace.Items.Add(new ListItem("苏州", "苏州"));
            }
            else if (englishExam.examPlace.Trim() == "苏州")
            {
                ddlEnglishExamPlace.Items.Add(new ListItem("苏州", "苏州"));
                ddlEnglishExamPlace.Items.Add(new ListItem("合肥", "合肥"));
            }
        }
コード例 #2
0
        //初始化编辑页面
        public void InitialNotifyEdit(int englishExamId)
        {
            DalOperationAboutEnglishExam dal = new DalOperationAboutEnglishExam();

            DataSet ds = dal.GetEnglishExamNotifyIngById(englishExamNotifyId);
            DataRowCollection drc = ds.Tables[0].Rows;
            for (int i = 0; i < drc.Count; i++)
            {
                ddlEnglishExamNotify.Items.Add(new ListItem(drc[i]["englishExamNotifyTitle"].ToString().Trim(), drc[i]["englishExamNotifyId"].ToString().Trim()));
            }
            StudentsList studentList = dal.GetEnglishExamSignUpStudentInfoByStudentNo(studentNo);

            ltlName.Text = studentList.studentName;
            ltlSex.Text = (studentList.Sex == 1 ? "女" : "男");
            ltlStudentNo.Text = studentList.studentNo;
            ltlCardType.Text = studentList.CardType;
            ltlCardNum.Text = studentList.CardNum;
            ltlMatriculationDate.Text = studentList.MatriculationDate.ToString("yyyy-MM-dd");
            ltlMajor.Text = studentList.studentSpeciality;
            ltlSchoolClass.Text = studentList.SchoolClassName;

            EnglishExam englishExam = dal.GetEnglishExamSignUpInfoByStudentNo(studentNo, englishExamId);

            if (englishExam.examType.Trim() == "四级")
            {
                ddlEnglishExamType.Items.Add(new ListItem("四级", "四级"));
                ddlEnglishExamType.Items.Add(new ListItem("六级", "六级"));
            }
            else if (englishExam.examType.Trim() == "六级")
            {
                ddlEnglishExamType.Items.Add(new ListItem("六级", "六级"));
                ddlEnglishExamType.Items.Add(new ListItem("四级", "四级"));
            }

            if (englishExam.examPlace.Trim() == "合肥")
            {
                ddlEnglishExamPlace.Items.Add(new ListItem("合肥", "合肥"));
                ddlEnglishExamPlace.Items.Add(new ListItem("苏州", "苏州"));
            }
            else if (englishExam.examPlace.Trim() == "苏州")
            {
                ddlEnglishExamPlace.Items.Add(new ListItem("苏州", "苏州"));
                ddlEnglishExamPlace.Items.Add(new ListItem("合肥", "合肥"));
            }

            if (englishExam.englishExamSignUpConfirm == 1)
            {
                btnConfirm.Text = "取消确认报名信息";
                btnConfirm.Attributes.Add("onclick", "return confirm('是否取消确认报名信息?')");
                ddlEnglishExamType.Attributes.Add("disabled", "disabled");
                ddlEnglishExamPlace.Attributes.Add("disabled", "disabled");
            }
            else
            {
                btnConfirm.Attributes.Add("onclick", "return confirm('是否确认报名信息(包括基本信息、考试类型、考试地点等)?')");
            }
            hidExamType.Value = englishExam.examType;
            hidExamPlace.Value = englishExam.examPlace;
        }
コード例 #3
0
        //初始化编辑页面
        public void InitialNotifyEdit(int englishExamId)
        {
            DalOperationAboutEnglishExam dal = new DalOperationAboutEnglishExam();

            DataSet ds = dal.GetEnglishExamNotifyIngById(englishExamNotifyId);
            DataRowCollection drc = ds.Tables[0].Rows;
            for (int i = 0; i < drc.Count; i++)
            {
                ddlEnglishExamNotify.Items.Add(new ListItem(drc[i]["englishExamNotifyTitle"].ToString().Trim(), drc[i]["englishExamNotifyId"].ToString().Trim()));
            }

            EnglishExam englishExam = dal.GetEnglishExamSignUpInfoByStudentNo(studentNo, englishExamId);

            //txtIsPaid.Text = englishExam.isPaid.ToString();
            txtIsPaidRemark.Text = englishExam.isPaidRemark;
            //txtExamCertificateState.Text = englishExam.examCertificateState;
            txtExamCertificateStateRemark.Text = englishExam.examCertificateRemark;
            txtGrade.Text = englishExam.grade;
            //txtGradeCertificateState.Text = englishExam.gradeCertificateState;
            txtGradeCertificateStateRemark.Text = englishExam.gradeCertificateRemark;

            for (int i = 0; i < ddlIspaid.Items.Count; i++)
            {
                if (int.Parse(ddlIspaid.Items[i].Value.Trim()) == englishExam.isPaid)
                {
                    ddlIspaid.SelectedIndex = i;
                }
            }

            for (int i = 0; i < ddlExamCertificate.Items.Count; i++)
            {
                if (ddlExamCertificate.Items[i].Value.Trim() == englishExam.examCertificateState.Trim())
                {
                    ddlExamCertificate.SelectedIndex = i;
                }
            }

            for (int i = 0; i < ddlGradeCertificate.Items.Count; i++)
            {
                if (ddlGradeCertificate.Items[i].Value.Trim() == englishExam.gradeCertificateState.Trim())
                {
                    ddlGradeCertificate.SelectedIndex = i;
                }
            }
        }