protected void btnSave_Click(object sender, EventArgs e) { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntTransID = Convert.ToInt64(Request.QueryString["TransID"].ToString()); objBEProctor.ProctorID = Convert.ToInt16(ddlProctorName.SelectedValue); objBProctor.BAddProctor(objBEProctor); if (objBEProctor.IntResult == 1) { trMessage.Visible = true; trAddProctor.Visible = false; trViewProctor.Visible = true; lblProctorName.Text = ddlProctorName.SelectedItem.Text.ToString(); lblInfo.Text = Resources.ResMessages.Proctor_AddProctor; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Success; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success); } else { trMessage.Visible = true; lblInfo.Text = Resources.ResMessages.Proctor_Error_AddProctor; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Error; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error); } }
protected void SetFlags(string strType, int intValue) { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBEProctor.strStatus = strType; objBEProctor.IntResult = intValue; objBProctor.BSetTransactionFlags(objBEProctor); }
protected void lnkFile_Click(object sender, EventArgs e) { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBEProctor.IntExamID1 = Convert.ToInt64(GetTransID()); objBProctor.BGetExamDetails(objBEProctor); if (objBEProctor.DsResult.Tables[0].Rows.Count > 0) { if (objBEProctor.DsResult.Tables[0].Rows[0]["StoredFileName"] != null && objBEProctor.DsResult.Tables[0].Rows[0]["StoredFileName"].ToString() != "") { string UploadedFile = objBEProctor.DsResult.Tables[0].Rows[0]["StoredFileName"].ToString(); string MapPath = System.Web.HttpContext.Current.Server.MapPath("../Provider/Provider_Uploads"); string fullPath = MapPath + '\\' + UploadedFile; FileInfo fi = new FileInfo(fullPath); if (fi.Exists) { long sz = fi.Length; Response.ClearContent(); Response.ContentType = MimeType(Path.GetExtension(fullPath)); Response.AddHeader("Content-Disposition", string.Format("attachment; filename = {0}", System.IO.Path.GetFileName(fullPath))); Response.AddHeader("Content-Length", sz.ToString("F0")); Response.TransmitFile(fullPath); Response.End(); } else { //lblError.Visible = true; //lblError.ForeColor = System.Drawing.Color.Red; //lblError.Text = "File doesnot exist"; //ScriptManager.RegisterStartupScript(this, this.GetType(), "NotSaved", "alert('File doesnot exist');", true); Page.ClientScript.RegisterStartupScript(GetType(), "MyScript", "alert('File doesnot exist');", true); } } else { lnkProviderFile.Visible = false; lblError.Visible = true; lblError.Text = "N/A"; } } }
protected void lnlFile_Click(Object sender, EventArgs e) { BProctor objBProctor = new BProctor(); BEProctor objBEProctor = new BEProctor(); objBEProctor.IntTransID = Convert.ToInt64(GetTransID()); objBProctor.BGetProctorReviewDetails(objBEProctor); if (objBEProctor.DsResult.Tables[0].Rows.Count > 0) { if (objBEProctor.DsResult.Tables[0].Rows[0]["OriginalProctorFileName"] != null && objBEProctor.DsResult.Tables[0].Rows[0]["OriginalProctorFileName"].ToString() != string.Empty) { string UploadedFile = objBEProctor.DsResult.Tables[0].Rows[0]["StoredProctorFileName"].ToString(); string MapPath = System.Web.HttpContext.Current.Server.MapPath(System.Configuration.ConfigurationManager.AppSettings["ProctorUploads"].ToString()); string fullPath = MapPath + '\\' + UploadedFile; FileInfo fi = new FileInfo(fullPath); if (fi.Exists) { long sz = fi.Length; Response.ClearContent(); Response.ContentType = MimeType(Path.GetExtension(fullPath)); Response.AddHeader("Content-Disposition", string.Format("attachment; filename = {0}", System.IO.Path.GetFileName(fullPath))); Response.AddHeader("Content-Length", sz.ToString("F0")); Response.TransmitFile(fullPath); Response.End(); } else { //ScriptManager.RegisterStartupScript(this, this.GetType(), "NotSaved", "alert('File doesnot exist');", true); Page.ClientScript.RegisterStartupScript(GetType(), "MyScript", "alert('File doesnot exist');", true); //lblFile.Text = "File doesnot exist"; } } else { lnlFile.Visible = false; imgCancel.Visible = false; //lblFile.Visible = true; //lblFile.Text = "N/A"; } } }
protected void BindProctors() { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBProctor.BGetProctor(objBEProctor); if (objBEProctor.DsResult.Tables[0].Rows.Count > 0) { ddlProctorName.DataTextField = "ProctorName"; ddlProctorName.DataValueField = "UserID"; ddlProctorName.DataSource = objBEProctor.DsResult.Tables[0]; ddlProctorName.DataBind(); } }
protected void GetSlotsTable_Reset() { try { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.StrDate = Convert.ToDateTime(calScheduleDate.SelectedDate).ToString("MM/dd/yyyy").Replace("-", "/").ToString(); objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBProctor.BGetBlockedDatesForSelectedDate(objBEProctor); Session["DSSLOTS"] = objBEProctor.DsResult; objBEProctor = null; objBProctor = null; } catch { } }
protected void DeleteProviderUploadedFile() { try { string strpath = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings["ProctorUploads"]); BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntTransID = Convert.ToInt64(GetTransID()); objBProctor.BGetProctorReviewDetails(objBEProctor); if (objBEProctor.DsResult != null) { if (objBEProctor.DsResult.Tables[0].Rows.Count > 0) { objBEProctor.strUploadPath = objBEProctor.DsResult.Tables[0].Rows[0]["StoredProctorFileName"].ToString(); string strTotalPath = strpath + '\\' + objBEProctor.strUploadPath.ToString(); System.IO.FileInfo fi = new System.IO.FileInfo(strTotalPath); fi.Delete(); } else { //upFile.Visible = true; lnlFile.Visible = false; imgCancel.Visible = false; } } objBProctor.BDeleteScreenshot(objBEProctor); if (objBEProctor.IntResult == 1) { //lblFile.Visible = true; // lblFile.Text = "N/A"; //upFile.Visible = true; lnlFile.Visible = false; imgCancel.Visible = false; } } catch (Exception) { } }
protected void LoadData() { try { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.StrDate = calDate.SelectedDate.ToShortDateString(); objBEProctor.dtDate = calDate.SelectedDate; objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBProctor.BGetProctorExams(objBEProctor); gvStudentExams.DataSource = objBEProctor.DtResult; objBEProctor = null; objBProctor = null; } catch (Exception Ex) { throw Ex; } }
protected void btnContinue_Click(object sender, EventArgs e) { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBEProctor.StudentIdentity = chkValidateIdentity.Checked; objBProctor.BSaveIdentityValidation(objBEProctor); if (chkValidateIdentity.Checked) { Response.Redirect("StudentLookUp.aspx?" + Request.QueryString.ToString()); } else { Response.Write("<script type='text/javascript'>window.close();</script>"); } }
protected void getExamDetails() { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBEProctor.IntExamID1 = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBProctor.BGetExamDetails(objBEProctor); if (objBEProctor.DsResult.Tables[0].Rows.Count > 0) { // lblExamID.Text = CommonFunctions.CheckNullValue(objBEProctor.DsResult.Tables[0].Rows[0]["TransID"].ToString()); lblDAte.Text = CommonFunctions.CheckNullValue(objBEProctor.DsResult.Tables[0].Rows[0]["ExamDate"].ToString()); lblSlot.Text = CommonFunctions.CheckNullValue(objBEProctor.DsResult.Tables[0].Rows[0]["ExamStartDate"].ToString()); lblCourseName.Text = CommonFunctions.CheckNullValue(objBEProctor.DsResult.Tables[0].Rows[0]["CourseName"].ToString()); lblExamName.Text = CommonFunctions.CheckNullValue(objBEProctor.DsResult.Tables[0].Rows[0]["ExamName"].ToString()); lblDuration.Text = CommonFunctions.CheckNullValue(objBEProctor.DsResult.Tables[0].Rows[0]["ExamDuration"].ToString()); lblEndTime.Text = CommonFunctions.CheckNullValue(objBEProctor.DsResult.Tables[0].Rows[0]["ExamEndDate"].ToString()); if (objBEProctor.DsResult.Tables[0].Rows[0]["OriginalFileName"] != null && objBEProctor.DsResult.Tables[0].Rows[0]["OriginalFileName"].ToString() != "") { lnkProviderFile.Visible = true; lnkProviderFile.Text = objBEProctor.DsResult.Tables[0].Rows[0]["OriginalFileName"].ToString(); lblError.Visible = false; } else { lnkProviderFile.Visible = false; lblError.Visible = true; lblError.Text = "N/A"; } if (objBEProctor.DsResult.Tables[0].Rows[0]["ExamLink"] != null && objBEProctor.DsResult.Tables[0].Rows[0]["ExamLink"].ToString() != "") { lblURL.Text = objBEProctor.DsResult.Tables[0].Rows[0]["ExamLink"].ToString(); } else { lblURL.Text = "N/A"; } } }
protected void gvSlots_ItemCommand(object sender, GridCommandEventArgs e) { try { if (e.CommandName.ToString() == "DeleteSlot") { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBEProctor.intID = Convert.ToInt32(e.CommandArgument.ToString()); objBProctor.BDeleteBlockedDates(objBEProctor); if (objBEProctor.IntResult == 1) { gvSlots.Rebind(); } } } catch { } }
protected void gvSlots_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { try { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBProctor.BGetBlockedDates(objBEProctor); if (objBEProctor.DtResult.Rows.Count > 0) { gvSlots.DataSource = objBEProctor.DtResult; } else { gvSlots.DataSource = new string[] { } }; } catch { } }
protected void LoadData() { try { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); //BEAuditor objBEAuditor = new BEAuditor() { }; objBEProctor.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID]); objBProctor.BGetAutoProctorInbox(objBEProctor); if (objBEProctor.objDs.Tables[1].Rows.Count > 0) { // trGridPages.Visible = true; Session[BaseClass.EnumPageSessions.DATATABLE] = objBEProctor.objDs.Tables[1]; //ViewState[BaseClass.EnumPageSessions.CurrentPage] = CurrentPage; // lblCount.Text = objBEAuditor.objDs.Tables[0].Rows[0]["TRANSID"].ToString(); //this.BindGrid("LOAD"); gvAutoProctorInbox.DataSource = objBEProctor.objDs.Tables[1]; //gvAuditorInbox.DataBind(); btnApprove.Visible = true; } else { // trGridPages.Visible = false; Session[BaseClass.EnumPageSessions.DATATABLE] = null; //ViewState[BaseClass.EnumPageSessions.CurrentPage] = CurrentPage; // lblCount.Text = "0"; gvAutoProctorInbox.DataSource = new object[] { }; //gvAuditorInbox.DataBind(); btnApprove.Visible = false; //this.SetDefaultPagingImages(); } } catch (Exception Ex) { throw Ex; } }
protected void btnAddDate_Click(object sender, EventArgs e) { try { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.strSlotDate = Convert.ToDateTime(CalendarExtender1.SelectedDate.ToString()).ToString("MM/dd/yyyy").Replace("-", "/"); if (chkAllDay.Checked == true) { objBEProctor.strSlotTime = null; objBEProctor.intAllDay = 1; } else { //objBEProctor.strSlotTime = Convert.ToDateTime(RadTimePicker1.DbSelectedDate).ToString("hh:mm tt").ToString(); objBEProctor.strSlotTime = RadTimePicker1.SelectedTime.ToString(); objBEProctor.intAllDay = 0; } objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBProctor.BSaveBlockedDates(objBEProctor); if (objBEProctor.IntResult == 1) { ScriptManager.RegisterStartupScript(this, this.GetType(), "NotSaved", "alert('Date added successfully');", true); CalendarExtender1.SelectedDate = null; RadTimePicker1.SelectedTime = null; gvSlots.Rebind(); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "NotSaved", "alert('Date already exists');", true); } } catch { ScriptManager.RegisterStartupScript(this, this.GetType(), "NotSaved", "alert('Please enter the valid Date and Time');", true); } }
protected void btnApprove_Click(object sender, EventArgs e) { string strTransID = string.Empty; //foreach (GridViewRow row in gvAuditorInbox.Rows) //{ // CheckBox chk = (CheckBox)row.Cells[0].FindControl("chkSelect"); // if (chk.Checked == true) // { // Label lbl = (Label)row.Cells[1].FindControl("lblExamID"); // strTransID = strTransID + lbl.Text.ToString() + "$"; // } //} foreach (GridDataItem item in gvAutoProctorInbox.Items) { CheckBox chk = (CheckBox)item.Cells[0].FindControl("chkSelect"); if (chk.Checked == true) { Label lbl = (Label)item.Cells[1].FindControl("lblExamID"); strTransID = strTransID + lbl.Text.ToString() + "$"; } } if (strTransID != string.Empty) { strTransID = strTransID.Substring(0, strTransID.Length - 1); BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.strTransID = strTransID; objBEProctor.IntEmployeeID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBProctor.BApproveAutoProcTransaction(objBEProctor); objBEProctor = null; objBEProctor = null; //foreach (GridDataItem item in gvAuditorInbox.Items) //{ // CheckBox chk = (CheckBox)item.Cells[0].FindControl("chkSelect"); // //EmailMsg obj; // if (chk.Checked == true) // { //BEAuditor objBEAuditor1 = new BEAuditor(); BAuditor objBAuditor1 = new BAuditor(); BEProctor objBEProctor1 = new BEProctor(); BProctor objBProctor1 = new BProctor(); objBEProctor1.strTransID = strTransID; objBProctor1.BGetAutoProctorProviderDetails(objBEProctor1); if (objBEProctor1.DsResult.Tables[0].Rows.Count > 0) { for (int i = 0; i < objBEProctor1.DsResult.Tables[0].Rows.Count; i++) { DataTable objDT = new DataTable(); objDT = objBEProctor1.DsResult.Tables[0]; objBEProctor1.IntUserID = Convert.ToInt32(objDT.Rows[i]["ExamProviderID"]); objBEProctor1.IntProviderID = Convert.ToInt32(objDT.Rows[i]["UserID"]); objBEProctor1.IntTransID = Convert.ToInt64(objDT.Rows[i]["TransID"]); //BEMail objBEMail = new BEMail(); //BMail objBMail = new BMail(); //objBEMail.IntTransID = objBEProctor1.IntTransID; //string FYI = "FYI"; //string mail = "Mail"; //if (mail == "Mail") //{ // objBEMail.IntUserID = objBEAuditor1.IntUserID; // objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamApprovedbyAuditor.ToString(); // objBMail.BSendEmail(objBEMail); //} //if (FYI == "FYI") //{ // BECommon objBECommon = new BECommon(); // BCommon objBCommon = new BCommon(); // objBECommon.IntTransID = objBEProctor1.IntTransID; // objBCommon.BAuditorCheckEmailForApproval(objBECommon); // if (objBECommon.IntstatusFlag == 1) // { // objBEMail.IntUserID = objBEProctor1.IntUserID; // objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamApprovedbyAuditorFYI.ToString(); // objBMail.BSendEmail(objBEMail); // } //} } // Label lbl = (Label)item.Cells[1].FindControl("lblExamID"); } lblSuccess.Text = Resources.ResMessages.Audit_TransApprove; // this.LoadData(); gvAutoProctorInbox.Rebind(); } else { lblSuccess.Text = Resources.ResMessages.Audit_TransSelect; } }
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; } }
protected void btnConfirm_Click(object sender, EventArgs e) { if (Request.QueryString["type"].ToString() == "1") { if (Request.QueryString["status"] != null && Request.QueryString["status"].ToString() != string.Empty) { string status = AppSecurity.Decrypt(Request.QueryString["status"].ToString()); if (status == "Approve") { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBEProctor.IntFlag = 0; objBEProctor.strStatus = status; objBProctor.BProctorApproveExam(objBEProctor); //try //{ // StreamingServer.ServiceSoapClient client = new StreamingServer.ServiceSoapClient(); // client.StopStreaming("", AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); //} //catch //{ //} btnConfirm.Visible = false; btnBack.Visible = false; imgtick.Visible = true; lblSuccess.Text = Resources.ResMessages.Proctor_ExamApprove; try { BEMail objBEMail = new BEMail(); BMail objBMail = new BMail(); objBEMail.IntUserID = 0; objBEMail.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamApprovalConfirmation.ToString(); objBMail.BSendEmail(objBEMail); } catch (Exception) { //throw ex; } } else if (status == "Close") { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBEProctor.IntFlag = 0; objBEProctor.strStatus = status; objBProctor.BProctorApproveExam(objBEProctor); //try //{ // StreamingServer.ServiceSoapClient client = new StreamingServer.ServiceSoapClient(); // client.StopStreaming("", AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); //} //catch //{ //} btnConfirm.Visible = false; btnBack.Visible = false; imgtick.Visible = true; lblSuccess.Text = Resources.ResMessages.Proctor_ExamClose; try { BEMail objBEMail = new BEMail(); BMail objBMail = new BMail(); objBEMail.IntUserID = 0; objBEMail.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamApprovalConfirmation.ToString(); objBMail.BSendEmail(objBEMail); } catch (Exception) { //throw ex; } } else if (status == "Incomplete") { BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBEProctor.IntFlag = 0; objBEProctor.strStatus = status; objBProctor.BProctorApproveExam(objBEProctor); //try //{ // StreamingServer.ServiceSoapClient client = new StreamingServer.ServiceSoapClient(); // client.StopStreaming("", AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); //} //catch //{ //} btnConfirm.Visible = false; btnBack.Visible = false; imgtick.Visible = true; lblSuccess.Text = Resources.ResMessages.Proctor_ExamIncomplete; try { BEMail objBEMail = new BEMail(); BMail objBMail = new BMail(); objBEMail.IntUserID = 0; objBEMail.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamApprovalConfirmation.ToString(); objBMail.BSendEmail(objBEMail); } catch (Exception) { //throw ex; } } //status = ""; } } }
protected void gvStudentExams_ItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == "VIEWFIRSTSTUDENT") { LinkButton lnkStudentFirstName = (LinkButton)e.Item.FindControl("lnkStudentFirstName"); int StudentID = int.Parse(lnkStudentFirstName.CommandArgument.ToString()); //Response.Redirect("ScheduleExam.aspx?TransID=" + AppSecurity.Encrypt(e.CommandArgument.ToString()), false); Response.Redirect("ViewUserDetails.aspx?Type=V&" + AppSecurity.Encrypt("StudentID=" + StudentID), false); } else if (e.CommandName == "VIEWLASTSTUDENT") { LinkButton lnkStudentLastName = (LinkButton)e.Item.FindControl("lnkStudentLastName"); int StudentID = int.Parse(lnkStudentLastName.CommandArgument.ToString()); //Response.Redirect("ScheduleExam.aspx?TransID=" + AppSecurity.Encrypt(e.CommandArgument.ToString()), false); Response.Redirect("ViewUserDetails.aspx?Type=V&" + AppSecurity.Encrypt("StudentID=" + StudentID), false); } else if (e.CommandName == "VIEWEXAM") { string ExamTransID = e.CommandArgument.ToString(); string[] strSplit = ExamTransID.Split('-'); BEProctor objBEProctor = new BEProctor(); BProctor objBProctor = new BProctor(); objBEProctor.IntTransID = Convert.ToInt64(strSplit[0].ToString()); //objBProctor.BGetStudentValidationStatus(objBEProctor); Response.Redirect("ProctorExamView.aspx?TransID=" + AppSecurity.Encrypt(strSplit[0].ToString())); //if (objBEProctor.strOTSessionID != string.Empty && objBEProctor.strStatus != "1") //{ // //if (objBEProctor.strStatus == "1") // //NextPage = "IdentityVerification.aspx"; // lblError.Text = ""; // lblError.Visible = false; // System.Text.StringBuilder sb = new System.Text.StringBuilder(); // sb.Append("var win = window.open('ExamView.aspx?TransID=" + AppSecurity.Encrypt(strSplit[0].ToString()) + "&OTSessionID=" + AppSecurity.Encrypt(objBEProctor.strOTSessionID) + "','_blank','width='+screen.width+',height='+screen.height+',fullscreen=yes,resizable=no,toolbar=no,menubar=no,location=no');"); // sb.Append("if (win == null || typeof(win) == 'undefined' || win.test == 'undefined')alert('The popup was blocked. You must allow popups to use this site.');"); // ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowSuccess", sb.ToString(), true); // objBEProctor = null; // objBProctor = null; //} //else //{ // lblError.Text = "Student has no active sessions for this exam."; // lblError.Visible = true; //} } else if (e.CommandName == "VIEWEXAMDETAILS") { LinkButton lnkExamName = (LinkButton)e.Item.FindControl("lnkExamName"); int ExamID = int.Parse(lnkExamName.CommandArgument.ToString()); ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(760/2);var Mtop = (screen.height/2)-(700/2);window.open('ExamDetails.aspx?TransID=" + AppSecurity.Encrypt(lnkExamName.CommandArgument.ToString()) + "', null, 'height=400,width=800,status=yes,toolbar=no,scrollbars=yes,menubar=no,location=no,top=\'+Mtop+\', left=\'+Mleft+\'' );", true); //Response.Redirect("ViewUserDetails.aspx?Type=V&" + AppSecurity.Encrypt("StudentID=" + StudentID), false); } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { BProctor objBProctor = new BProctor(); BEProctor objBEProctor = new BEProctor(); objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBEProctor.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID].ToString()); objBProctor.BGetExamTransactionStatus(objBEProctor); string stat = ""; if (rdApprove.SelectedIndex == 0) { stat = "Approve"; } else if (rdApprove.SelectedIndex == 1) { stat = "Close"; } else if (rdApprove.SelectedIndex == 2) { stat = "Incomplete"; } if (objBEProctor.DtResult.Rows[0][0].ToString() == "3") { if (stat != "" && stat == "Approve") { Response.Redirect("ProctorConfirmation.aspx?type=1&TransID=" + AppSecurity.Encrypt(objBEProctor.IntTransID.ToString()).ToString() + "&status=" + AppSecurity.Encrypt(stat) + "", false); } else { //lblalert.Visible = true; //lblalert.Text = "Exam has been already completed, please approve for auditor action"; return; } } else if (objBEProctor.DtResult.Rows[0][0].ToString() == "2") { if (stat != "" && stat != "Approve") { if (stat == "Close") { //BEProctor objBEProctor = new BEProctor(); //BProctor objBProctor = new BProctor(); //objBEProctor.IntTransID = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); //objBEProctor.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBEProctor.IntFlag = 0; objBEProctor.strStatus = stat; objBProctor.BProctorApproveExam(objBEProctor); Response.Redirect("ProctorConfirmation.aspx?type=1&TransID=" + AppSecurity.Encrypt(objBEProctor.IntTransID.ToString()).ToString() + "&status=" + AppSecurity.Encrypt("Approve") + "", false); } else { Response.Redirect("ProctorConfirmation.aspx?type=1&TransID=" + AppSecurity.Encrypt(objBEProctor.IntTransID.ToString()).ToString() + "&status=" + AppSecurity.Encrypt(stat) + "", false); } } else if (stat == "Approve") { //lblalert.Visible = true; //lblalert.Text = "Exam is still in progress"; return; } } else { //lblInfo.Visible = true; } objBProctor = null; objBEProctor = null; } catch (Exception Ex) { throw Ex; } }
protected void btnSaveImage_Click(object sender, EventArgs e) { //if (Page.IsValid) //{ try { BProctor objBProctor = new BProctor(); BEProctor objBEProctor = new BEProctor(); objBEProctor.IntTransID = Convert.ToInt64(GetTransID()); if (chkcam.Checked == true) { objBEProctor.boolcam = true; } else { objBEProctor.boolcam = false; } if (chkaudio.Checked == true) { objBEProctor.boolaudio = true; } else { objBEProctor.boolaudio = false; } if (chkdesktop.Checked == true) { objBEProctor.booldesktop = true; } else { objBEProctor.booldesktop = false; } if (chkvalidid.Checked == true) { objBEProctor.boolidvalid = true; } else { objBEProctor.boolidvalid = false; } if (ddlOs.SelectedIndex != 0) { objBEProctor.strOs = ddlOs.SelectedItem.Text; } else { objBEProctor.strOs = ""; } if (ddlBrowser.SelectedIndex != 0) { objBEProctor.strBrowser = ddlBrowser.SelectedItem.Text; } else { objBEProctor.strBrowser = ""; } if (txtProctorComments.Text == "") { objBEProctor.strProctorComments = ""; } else { objBEProctor.strProctorComments = txtProctorComments.Text; } if (ScreenshotFileUpload.UploadedFiles.Count > 0) { //check image name and do not overwrite duplicates. foreach (UploadedFile f in ScreenshotFileUpload.UploadedFiles) { string strOriginalFileName = f.FileName; string strUploadFileName = CommonFunctions.generateUploadFileName(strOriginalFileName); objBEProctor.strOriginalFileName = strOriginalFileName; objBEProctor.strUploadPath = strUploadFileName; f.SaveAs(Server.MapPath(System.Configuration.ConfigurationManager.AppSettings["ProctorUploads"]) + '\\' + strUploadFileName, false); } } else { objBEProctor.strOriginalFileName = string.Empty; objBEProctor.strUploadPath = string.Empty; } objBProctor.BUpdateScreenshotDetails(objBEProctor); if (objBEProctor.IntResult > 0) { lblfileupload.Text = "Proctor review details uploaded successfully."; lblfileupload.ForeColor = System.Drawing.Color.Green; //lnlFile.Text = objBEProctor.strOriginalFileName; GetUploadedFileDetails(Convert.ToInt64(GetTransID())); //lnlFile.Visible = true; //chkcam.Checked = false; //chkaudio.Checked = false; //chkdesktop.Checked = false; //chkvalidid.Checked = false; //ddlBrowser.SelectedIndex = 0; //ddlOs.SelectedIndex = 0; //txtProctorComments.Text = ""; } //} //else //{ // lblfileupload.Text = "Please fill the above details and save."; // lblfileupload.ForeColor = System.Drawing.Color.Red; //} } catch (Exception Ex) { throw Ex; } //} }
protected void GetUploadedFileDetails(Int64 TransactionID) { BProctor objBProctor = new BProctor(); BEProctor objBEProctor = new BEProctor(); objBEProctor.IntTransID = TransactionID; objBProctor.BGetProctorReviewDetails(objBEProctor); if (objBEProctor.DsResult != null) { if (objBEProctor.DsResult.Tables[0].Rows.Count > 0) { if (objBEProctor.DsResult.Tables[0].Rows[0]["CamStatus"].ToString().ToLower() == "working") { chkcam.Checked = true; } else { chkcam.Checked = false; } if (objBEProctor.DsResult.Tables[0].Rows[0]["AudioStatus"].ToString().ToLower() == "working") { chkaudio.Checked = true; } else { chkaudio.Checked = false; } if (objBEProctor.DsResult.Tables[0].Rows[0]["DesktopStatus"].ToString().ToLower() == "working") { chkdesktop.Checked = true; } else { chkdesktop.Checked = false; } if (objBEProctor.DsResult.Tables[0].Rows[0]["IDStatus"].ToString().ToLower() == "valid") { chkvalidid.Checked = true; } else { chkvalidid.Checked = false; } if (objBEProctor.DsResult.Tables[0].Rows[0]["OS"] != DBNull.Value && objBEProctor.DsResult.Tables[0].Rows[0]["OS"].ToString() != string.Empty) { ddlOs.FindItemByText(objBEProctor.DsResult.Tables[0].Rows[0]["OS"].ToString()).Selected = true; } else { ddlOs.SelectedIndex = 0; } if (objBEProctor.DsResult.Tables[0].Rows[0]["Browser"] != DBNull.Value && objBEProctor.DsResult.Tables[0].Rows[0]["Browser"].ToString() != "") { ddlBrowser.FindItemByText(objBEProctor.DsResult.Tables[0].Rows[0]["Browser"].ToString()).Selected = true; } else { ddlBrowser.SelectedIndex = 0; } if (objBEProctor.DsResult.Tables[0].Rows[0]["ReviewComments"] != DBNull.Value) { txtProctorComments.Text = objBEProctor.DsResult.Tables[0].Rows[0]["ReviewComments"].ToString(); } if (objBEProctor.DsResult.Tables[0].Rows[0]["OriginalProctorFileName"] != null && objBEProctor.DsResult.Tables[0].Rows[0]["OriginalProctorFileName"].ToString() != string.Empty) { lnlFile.Visible = true; lnlFile.Text = objBEProctor.DsResult.Tables[0].Rows[0]["OriginalProctorFileName"].ToString(); imgCancel.Visible = true; } else { lnlFile.Visible = false; imgCancel.Visible = false; } } } }