protected void Page_Load(object sender, EventArgs e) { //控制Tab的显示 string fragmentFlag = "1"; if (Request["fragment"] != null) { fragmentFlag = Request["fragment"]; } CommonUtility.ShowLiControl(fragmentFlag, liFragment1, liFragment2, liFragment3,liFragment4 , divFragment1, divFragment2, divFragment3,divFragment4); if (fragmentFlag.Equals("1")) { if (!IsPostBack) { DataListBindEnglishExamNotify(); } } if (fragmentFlag.Equals("2")) { if (!IsPostBack) { Javascript.ExcuteJavascriptCode("initBeforeUnloadEvent('温馨提示:当前页面数据可能未保存哟~(此为提示,并不代表您真正未保存数据),确定离开吗?');", Page); txtTitle.Attributes.Add("class", "required"); } } if (fragmentFlag.Equals("3")) { txtTitle.Attributes.Remove("class"); datepicker.Attributes.Remove("class"); if (!IsPostBack) { DataBindSchoolClassList(ddlSerachSchoolClass); DataBindEnglishExamSignUpInfo(); } } if (fragmentFlag.Equals("4")) { DalOperationAboutEnglishExam doac = new DalOperationAboutEnglishExam(); DataSet ds = doac.GetAllEnglishExamNotify(); DataRowCollection drc = ds.Tables[0].Rows; for (int i = 0; i < drc.Count; i++) { ddlEnglishExamNotifyExcel.Items.Add(new ListItem(drc[i]["englishExamNotifyTitle"].ToString().Trim(), drc[i]["englishExamNotifyId"].ToString().Trim())); } //绑定班级标识下拉列表 DataBindSchoolClassList(ddlSchoolClassExcel); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //控制Tab的显示 if (Request["fragment"] != null) { fragmentFlag = Request["fragment"]; } CommonUtility.ShowLiControl(fragmentFlag, liFragment1, liFragment2, liFragment3 , divFragment1, divFragment2, divFragment3); if (fragmentFlag.Equals("1")) { DataBindSchoolClassList(ddlSerachSchoolClass); DataBindEnglishExamSignUpInfo(); } else if (fragmentFlag.Equals("2")) { DalOperationAboutEnglishExam doac = new DalOperationAboutEnglishExam(); DataSet ds = doac.GetAllEnglishExamNotify(); DataRowCollection drc = ds.Tables[0].Rows; if (drc.Count == 0) { Javascript.AlertAndRedirect("当前暂无需要处理的四六级通知!", "/Teacher/EnglishExamManage.aspx?fragment=1", Page); } for (int i = 0; i < drc.Count; i++) { ddlEnglishExamNotify.Items.Add(new ListItem(drc[i]["englishExamNotifyTitle"].ToString().Trim(), drc[i]["englishExamNotifyId"].ToString().Trim())); } //绑定班级标识下拉列表 DataBindSchoolClassList(ddlSchoolClass); } else if (fragmentFlag.Equals("3")) { DalOperationAboutEnglishExam doac = new DalOperationAboutEnglishExam(); DataSet ds = doac.GetAllEnglishExamNotify(); DataRowCollection drc = ds.Tables[0].Rows; if (drc.Count == 0) { Javascript.AlertAndRedirect("当前暂无需要处理的四六级通知!", "/Teacher/EnglishExamManage.aspx?fragment=1", Page); } for (int i = 0; i < drc.Count; i++) { ddlEnglishExamNotifyExcel.Items.Add(new ListItem(drc[i]["englishExamNotifyTitle"].ToString().Trim(), drc[i]["englishExamNotifyId"].ToString().Trim())); } //绑定班级标识下拉列表 DataBindSchoolClassList(ddlSchoolClassExcel); } } }