Пример #1
0
        protected void btnValidate_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                try
                {
                    BStudent  objBStudent  = new BStudent();
                    BEStudent objBEStudent = new BEStudent();
                    objBEStudent.IntUserID  = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
                    objBEStudent.strAnswer1 = txtAnswer1.Text.Trim().ToString();
                    objBEStudent.strAnswer2 = txtAnswer2.Text.Trim().ToString();
                    objBEStudent.strAnswer3 = txtAnswer3.Text.Trim().ToString();
                    objBStudent.BValidateStudentSecurityQuestions(objBEStudent);
                    if (objBEStudent.IntResult == 1)
                    {
                        // Response.Redirect("ExamConfig.aspx?" + Request.QueryString.ToString(),false);
                        Response.Redirect("Agreements.aspx?" + Request.QueryString.ToString(), false);
                    }
                    else
                    {
                        // ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowSuccess", "alert('Invalid Security Answers,  Please try again')", true);

                        //lblFailed.Text = "Invalid Security Answers,  Please try again";
                        lblFailed.Text = Resources.ResMessages.Student_InvalidSecAns;
                    }
                }

                catch (Exception)
                {
                    // ErrorLog.WriteError(Ex);
                }
            }
        }