コード例 #1
0
        public static string[] UrlDecryptor(string strEncrypted)
        {
            string[] strAr        = null;
            string   strDecrypted = AppSecurity.Decrypt(strEncrypted);

            if (strDecrypted.Contains('&'))
            {
                strAr = strDecrypted.Split('&');
            }
            else
            {
                strAr = new string[1] {
                    strDecrypted
                }
            };
            return(strAr);
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 public string GetExamTransactionStatus(string TransID)
 {
     return(ClientAdapter.Instance.GetMessage(AppSecurity.Decrypt(TransID)));
 }
コード例 #4
0
        protected void GetAllRules()
        {
            BECommon objBECommon = new BECommon();
            BCommon  objBCommon  = new BCommon();

            objBECommon.StrFromPage = DisplayFrom;
            if (Request.QueryString["TransID"] != null)
            {
                objBECommon.iID     = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                objBECommon.iTypeID = 1;// sending TransID
            }
            if (Request.QueryString["ExamID"] != null)
            {
                try
                {
                    objBECommon.iID     = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ExamID"].ToString()));
                    objBECommon.iTypeID = 2;// sending ExamID
                }

                catch (Exception)
                {
                    objBECommon.iID     = Convert.ToInt32(Request.QueryString["ExamID"].ToString());
                    objBECommon.iTypeID = 2;// sending ExamID
                }
            }

            objBCommon.BGetExamRulesInformation(objBECommon);
            if (objBECommon.DsResult != null && objBECommon.DsResult.Tables.Count > 0 && objBECommon.DsResult.Tables[0].Rows.Count > 0)
            {
                gvStandard.DataSource = objBECommon.DsResult.Tables[0];
                gvStandard.DataBind();
            }
            else
            {
                gvStandard.DataSource = new string[] { }
            };

            if (objBECommon.DsResult != null && objBECommon.DsResult.Tables.Count > 0 && objBECommon.DsResult.Tables[1].Rows.Count > 0)
            {
                gvAllowed.DataSource = objBECommon.DsResult.Tables[1];
                gvAllowed.DataBind();
            }
            else
            {
                gvAllowed.DataSource = new string[] { }
            };

            if (objBECommon.DsResult != null && objBECommon.DsResult.Tables.Count > 0 && objBECommon.DsResult.Tables[2].Rows.Count > 0)
            {
                if (DisplayFrom == "STUDENT")
                {
                    gvSpecialInstructions_Student.DataSource = objBECommon.DsResult.Tables[2];
                    gvSpecialInstructions_Student.DataBind();
                    trSpecialStudent.Visible = true;
                    trSpecialProctor.Visible = false;
                }
                if (DisplayFrom == "PROCTOR")
                {
                    gvSpecialInstructions_Proctor.DataSource = objBECommon.DsResult.Tables[2];
                    gvSpecialInstructions_Proctor.DataBind();
                    trSpecialProctor.Visible = true;
                    trSpecialStudent.Visible = false;
                }
            }
            else
            {
                gvSpecialInstructions_Student.DataSource = new string[] { };
                gvSpecialInstructions_Proctor.DataSource = new string[] { };
                trSpecialProctor.Visible = true;
            }


            objBECommon = null;
            objBCommon  = null;
        }
    }
}
コード例 #5
0
 public static string UrlEncryptor(string strDecrypted)
 {
     return(AppSecurity.Encrypt(strDecrypted));
 }