protected void btnSearchExamCode_Click(object sender, EventArgs e) { txtExamNumber.Text = txtExamNumber.Text.Trim(); btnInsertExamSchedule.Visible = false; txtExamNumber.Visible = true; if (!string.IsNullOrEmpty(txtExamNumber.Text)) { BLL.ExamScheduleBiz biz = new BLL.ExamScheduleBiz(); bool result = biz.IsRightTestingNo(txtExamNumber.Text); if (result == false) { this.MasterSite.ModelError.ShowMessageError = SysMessage.PleaseInputTestingNo; this.MasterSite.ModelError.ShowModalError(); } else { Session["TestingNo"] = txtExamNumber.Text; var res = biz.GetExamByTestingNo(txtExamNumber.Text); if (res.IsError) { this.MasterSite.ModelError.ShowMessageError = "โปรดตรวจสอบข้อมูล"; this.MasterSite.ModelError.ShowModalError(); } else { Session["ExamNumber"] = res.DataResponse.TESTING_NO; Session["ExamDate"] = res.DataResponse.TESTING_DATE; Session["ExamTime"] = res.DataResponse.TEST_TIME_CODE; Session["PlaceCode"] = res.DataResponse.EXAM_PLACE_CODE; Session["ExamPlaceCode"] = res.DataResponse.EXAM_PLACE_CODE; Session["TestingNo"] = res.DataResponse.TESTING_NO; Session["TestingDate"] = res.DataResponse.TESTING_DATE; Session["TestTimeCode"] = res.DataResponse.TEST_TIME_CODE; Session["LicenseTypeCode"] = res.DataResponse.LICENSE_TYPE_CODE; Session["ExamPlaceGroupCode"] = res.DataResponse.EXAM_PLACE_GROUP_CODE; } Response.Redirect("~/Applicant/GroupApplicantDetail.aspx"); } } else { panContent.Visible = true; pnlExamSearch.Visible = false; if (rblDisplay.SelectedValue == "1") { pnlSearch.Visible = true; pnlCalendar.Visible = true; } else { pnlSearch.Visible = true; pnlTable.Visible = true; } } }
protected void btnSearchExamCode_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtExamNumber.Text)) { BLL.ExamScheduleBiz biz = new BLL.ExamScheduleBiz(); bool result = biz.IsRightTestingNo(txtExamNumber.Text); if (result == false) { UCModalError.ShowMessageError = SysMessage.PleaseInputTestingNo; UCModalError.ShowModalError(); } else { Session["TestingNo"] = txtExamNumber.Text; Response.Redirect("~/Applicant/GroupApplicantDetail.aspx"); } } else { pnlSearch.Visible = true; pnlCalendar.Visible = true; } }