protected void btnStep1Next_Click(object sender, EventArgs e) { BEStudent objBEStudent = new BEStudent(); BStudent objBStudent = new BStudent(); objBEStudent.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBStudent.BUpdateNextButtonTime(objBEStudent); if (TYPE == "1") { Response.Redirect("StudentexamiKNOW.aspx?TransID=" + Request.QueryString["TransID"].ToString() + "&&ExamiKEY=" + AppSecurity.Encrypt("1"), false); } else { Response.Redirect("StudentexamiKNOW.aspx?TransID=" + Request.QueryString["TransID"].ToString() + "&&ExamiKEY=" + AppSecurity.Encrypt("0"), false); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.Form["method"] != null) { BEStudent objBEStudent = new BEStudent(); BStudent objBStudent = new BStudent(); BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); if (Request.Form["TransID"] != null) { TransID = Convert.ToInt64(AppSecurity.Decrypt(HttpUtility.UrlDecode(Request.Form["TransID"].ToString()))); } switch (Request.Form["method"].ToString()) { case "GetIdentityValidation": { //BEStudent objBEStudent = new BEStudent(); //BStudent objBStudent = new BStudent(); //objBEStudent.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); objBEStudent.IntTransID = TransID; objBStudent.BGetIdentityValidation(objBEStudent); Response.Write(objBEStudent.StudentIdentity.ToString()); } break; case "ValidateStep1": { //BEStudent objBEStudent = new BEStudent(); //BStudent objBStudent = new BStudent(); //objBEStudent.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); objBEStudent.IntTransID = TransID; objBStudent.BGetIdentityValidation(objBEStudent); if (objBEStudent.StudentIdentity) { Response.Write("true"); } else { Response.Write("false"); } } break; //case "ValidateStep2": // { // BStudent objBStudent = new BStudent(); // BEStudent objBEStudent = new BEStudent(); // objBEStudent.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); // objBEStudent.strAnswer1 = Request.Form["Answer1"].ToString().Trim().ToString(); // objBEStudent.strAnswer2 = Request.Form["Answer2"].ToString().Trim().ToString(); // objBEStudent.strAnswer3 = Request.Form["Answer3"].ToString().Trim().ToString(); // objBStudent.BValidateStudentSecurityQuestions(objBEStudent); // if (objBEStudent.IntResult == 1) // Response.Write("true"); // else // Response.Write("false"); // } // break; case "ValidateStep2": { //BStudent objBStudent = new BStudent(); //BEStudent objBEStudent = new BEStudent(); objBEStudent.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBEStudent.strAnswer1 = Request.Form["Answer"].ToString().Trim().ToString(); objBEStudent.strQuestion1 = Request.Form["Question"].ToString().Trim().ToString(); objBEStudent.IntTransID = Convert.ToInt64(Request.Form["TransID"].ToString().Trim().ToString()); objBStudent.BRandomSecurityQuestionsValidation(objBEStudent); if (objBEStudent.IntResult == 1) { // Response.Write("true" + "|" + objBEStudent.StrResult.ToString()); //Response.Write(objBEStudent.StrResult.ToString()); Response.Write("true"); } else { Response.Write(objBEStudent.StrResult.ToString()); } } break; case "setStatus": { //BEProctor objBEProctor = new BEProctor(); //BProctor objBProctor = new BProctor(); //objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); objBEProctor.IntTransID = TransID; objBEProctor.strStatus = "STARTEXAM"; objBEProctor.IntResult = 0; objBProctor.BSetTransactionFlags(objBEProctor); } break; case "setexamiFACEStatus": { //BEProctor objBEProctor = new BEProctor(); //BProctor objBProctor = new BProctor(); //objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); objBEProctor.IntTransID = TransID; objBProctor.BSetexamiFACETransactionStatus(objBEProctor); } break; case "setexamiFACEDownLoadStatus": { //BEProctor objBEProctor = new BEProctor(); //BProctor objBProctor = new BProctor(); //objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); objBEProctor.IntTransID = TransID; objBEProctor.strStatus = Request.Form["Status"].ToString().Trim().ToString(); objBProctor.BSetexamiFACEDownLoadStatus(objBEProctor); } break; case "setexamiFACEDownLoadStatus1": { //BEProctor objBEProctor = new BEProctor(); //BProctor objBProctor = new BProctor(); //objBEProctor.IntTransID = Convert.ToInt32(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); //objBEProctor.strStatus = Request.Form["Status"].ToString().Trim().ToString(); //objBProctor.BSetexamiFACEDownLoadStatus(objBEProctor); BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); //objBECommon.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); objBECommon.IntTransID = TransID; objBECommon.IntstatusFlag = Convert.ToInt32(Request.Form["Status"].ToString().Trim().ToString()); objBCommon.BReenableBeginExamstatus(objBECommon); } break; case "ValidateStep3": { //BEStudent objBEStudent = new BEStudent(); //BStudent objBStudent = new BStudent(); //objBEStudent.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); objBEStudent.IntTransID = TransID; objBEStudent.IntstatusFlag = 2; objBStudent.BUpdateExamStatus(objBEStudent); Response.Write("true"); } break; case "ValidateStep4": { //BEStudent objBEStudent = new BEStudent(); //BStudent objBStudent = new BStudent(); //objBEStudent.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); objBEStudent.IntTransID = TransID; objBEStudent.IntFlag = 0; objBStudent.BSetExamStartandEndTime(objBEStudent); objBStudent.BsetExamCompleted(objBEStudent); Response.Write("true"); } break; case "GetSessionID": { //BEStudent objBEStudent = new BEStudent(); //BStudent objBStudent = new BStudent(); //objBEStudent.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); objBEStudent.IntTransID = TransID; objBStudent.BGetExamSessionIDWithPrefix(objBEStudent); if (objBEStudent.strSessionID.Length != 0) { if (objBEStudent.strSessionID.Substring(0, 1).ToString() == "G") { Response.Write(objBEStudent.strSessionID.Substring(2, objBEStudent.strSessionID.Length - 2)); } else if (objBEStudent.strSessionID.Substring(0, 1).ToString() == "W") { Response.Write(System.Configuration.ConfigurationManager.AppSettings["WebExURL"].ToString() + objBEStudent.strSessionID.Substring(2, objBEStudent.strSessionID.Length - 2)); } else if (objBEStudent.strSessionID.Substring(0, 1).ToString() == "E") { if (Session["isexamiFACE"].ToString() == "1") { if (objBEStudent.strSessionID.Substring(2, objBEStudent.strSessionID.Length - 2).ToString().ToUpper().Substring(0, 1) == "P") { Response.Write(System.Configuration.ConfigurationManager.AppSettings["ExamityMeeting_AutoProctorURL_Premium"].ToString() + objBEStudent.strSessionID.Substring(2, objBEStudent.strSessionID.Length - 2)); } else { Response.Write(System.Configuration.ConfigurationManager.AppSettings["ExamityMeeting_AutoProctorURL_Standard"].ToString() + objBEStudent.strSessionID.Substring(2, objBEStudent.strSessionID.Length - 2)); } } else { Response.Write(System.Configuration.ConfigurationManager.AppSettings["ExamityMeeting_URL"].ToString() + objBEStudent.strSessionID.Substring(2, objBEStudent.strSessionID.Length - 2)); } } else { Response.Write(System.Configuration.ConfigurationManager.AppSettings["ZoomJoinURL"].ToString() + objBEStudent.strSessionID.Substring(2, objBEStudent.strSessionID.Length - 2)); }; } } break; case "UpdateNextButtonTime": { //BEStudent objBEStudent = new BEStudent(); //BStudent objBStudent = new BStudent(); //objBEStudent.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.Form["TransID"].ToString())); objBEStudent.IntTransID = TransID; objBStudent.BUpdateNextButtonTime(objBEStudent); Response.Write("true"); } break; case "KeyStroke": { PostToKeyStroke(); } break; } objBEStudent = null; objBStudent = null; objBEProctor = null; objBProctor = null; } }