protected void BindSecurityQuestions()
        {
            try
            {
                BEStudent objBEStudent = new BEStudent();
                BStudent  objBStudent  = new BStudent();
                objBEStudent.IntUserID = 0;
                objBStudent.BBindProfileSecurityQuestions(objBEStudent);
                if (objBEStudent.DsResult.Tables[0].Rows.Count > 0)
                {
                    Session["Dataset"] = objBEStudent.DsResult;

                    ddlSecurityQuestion1.Items.Add(new Telerik.Web.UI.RadComboBoxItem("-- Select Security question --", "-1"));
                    ddlSecurityQuestion1.AppendDataBoundItems = true;
                    ddlSecurityQuestion1.DataSource           = objBEStudent.DsResult.Tables[0];
                    ddlSecurityQuestion1.DataTextField        = objBEStudent.DsResult.Tables[0].Columns[1].ToString();
                    ddlSecurityQuestion1.DataValueField       = objBEStudent.DsResult.Tables[0].Columns[0].ToString();
                    ddlSecurityQuestion1.DataBind();
                    ddlSecurityQuestion1.SelectedValue = "-1";
                    ddlSecurityQuestion2.Items.Add(new Telerik.Web.UI.RadComboBoxItem("-- Select Security question --", "-1"));
                    ddlSecurityQuestion3.Items.Add(new Telerik.Web.UI.RadComboBoxItem("-- Select Security question --", "-1"));
                }
            }
            catch (Exception)
            {
                // ErrorLog.WriteError(Ex);
            }
        }
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            lblsucc.Visible = false;
            trSecurityQuestionsView.Visible = false;
            trSecurityQuestionsEdit.Visible = true;
            ddlSecurityQuestion1.Items.Clear();
            ddlSecurityQuestion2.Items.Clear();
            ddlSecurityQuestion3.Items.Clear();
            BindSecurityQuestions();


            BEStudent objBEStudent = new BEStudent();
            BStudent  objBStudent  = new BStudent();

            objBEStudent.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]);
            objBStudent.BBindProfileSecurityQuestions(objBEStudent);

            if (objBEStudent.DsResult.Tables[1].Rows.Count > 0)
            {
                if (objBEStudent.DsResult.Tables[1].Rows[0]["Qid1"].ToString() != string.Empty)
                {
                    ddlSecurityQuestion1.SelectedValue = objBEStudent.DsResult.Tables[1].Rows[0]["Qid1"].ToString();
                }
                else
                {
                    ddlSecurityQuestion1.SelectedValue = "-1";
                }
                if (objBEStudent.DsResult.Tables[1].Rows[1]["Qid1"].ToString() != string.Empty)
                {
                    ddlSecurityQuestion2.SelectedValue = objBEStudent.DsResult.Tables[1].Rows[1]["Qid1"].ToString();
                }
                else
                {
                    ddlSecurityQuestion2.SelectedValue = "-1";
                }
                if (objBEStudent.DsResult.Tables[1].Rows[2]["Qid1"].ToString() != string.Empty)
                {
                    ddlSecurityQuestion3.SelectedValue = objBEStudent.DsResult.Tables[1].Rows[2]["Qid1"].ToString();
                }
                else
                {
                    ddlSecurityQuestion3.SelectedValue = "-1";
                }

                if (txtAnswer1.Text != string.Empty)
                {
                    txtAnswer1.Text = objBEStudent.DsResult.Tables[1].Rows[0]["QAnswer1"].ToString();
                }
                if (txtAnswer2.Text != string.Empty)
                {
                    txtAnswer2.Text = objBEStudent.DsResult.Tables[1].Rows[1]["QAnswer1"].ToString();
                }
                if (txtAnswer3.Text != string.Empty)
                {
                    txtAnswer3.Text = objBEStudent.DsResult.Tables[1].Rows[2]["QAnswer1"].ToString();
                }
            }
            ScriptManager.RegisterStartupScript(this, this.GetType(), "NotSaved", "document.getElementById('" + Label4.ClientID.ToString() + "').focus();", true);
        }
        protected void BindSecurityQuestions()
        {
            try
            {
                BEStudent objBEStudent = new BEStudent();
                BStudent  objBStudent  = new BStudent();
                objBEStudent.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]);
                objBStudent.BBindProfileSecurityQuestions(objBEStudent);
                if (objBEStudent.DsResult.Tables[0].Rows.Count > 0)
                {
                    ddlSecurityQuestion1.Items.Add(new Telerik.Web.UI.RadComboBoxItem("--Select Security question--", "-1"));
                    ddlSecurityQuestion1.AppendDataBoundItems = true;
                    ddlSecurityQuestion1.DataValueField       = "Qid";
                    ddlSecurityQuestion1.DataTextField        = "QText";
                    ddlSecurityQuestion1.DataSource           = objBEStudent.DsResult.Tables[0];
                    ddlSecurityQuestion1.DataBind();
                    ddlSecurityQuestion2.Items.Add(new Telerik.Web.UI.RadComboBoxItem("--Select Security question--", "-1"));
                    ddlSecurityQuestion2.DataValueField = "Qid";
                    ddlSecurityQuestion2.DataTextField  = "QText";
                    ddlSecurityQuestion2.DataSource     = objBEStudent.DsResult.Tables[0];
                    ddlSecurityQuestion2.DataBind();
                    ddlSecurityQuestion3.Items.Add(new Telerik.Web.UI.RadComboBoxItem("--Select Security question--", "-1"));
                    ddlSecurityQuestion3.DataValueField = "Qid";
                    ddlSecurityQuestion3.DataTextField  = "QText";
                    ddlSecurityQuestion3.DataSource     = objBEStudent.DsResult.Tables[0];
                    ddlSecurityQuestion3.DataBind();
                }

                if (objBEStudent.DsResult.Tables[1].Rows.Count > 0)
                {
                    lblSecurityQuestion1.Text = CommonFunctions.CheckNullValue(objBEStudent.DsResult.Tables[1].Rows[0]["QText1"].ToString());
                    lblSecurityQuestion2.Text = CommonFunctions.CheckNullValue(objBEStudent.DsResult.Tables[1].Rows[1]["QText1"].ToString());
                    lblSecurityQuestion3.Text = CommonFunctions.CheckNullValue(objBEStudent.DsResult.Tables[1].Rows[2]["QText1"].ToString());
                    lblAnswer1.Text           = CommonFunctions.CheckNullValue(objBEStudent.DsResult.Tables[1].Rows[0]["QAnswer1"].ToString());
                    lblAnswer2.Text           = CommonFunctions.CheckNullValue(objBEStudent.DsResult.Tables[1].Rows[1]["QAnswer1"].ToString());
                    lblAnswer3.Text           = CommonFunctions.CheckNullValue(objBEStudent.DsResult.Tables[1].Rows[2]["QAnswer1"].ToString());
                    txtAnswer1.Text           = CommonFunctions.CheckNullValue(objBEStudent.DsResult.Tables[1].Rows[0]["QAnswer1"].ToString());
                    txtAnswer2.Text           = CommonFunctions.CheckNullValue(objBEStudent.DsResult.Tables[1].Rows[1]["QAnswer1"].ToString());
                    txtAnswer3.Text           = CommonFunctions.CheckNullValue(objBEStudent.DsResult.Tables[1].Rows[2]["QAnswer1"].ToString());
                }
            }
            catch (Exception)
            {
                //ErrorLog.WriteError(Ex);
            }
        }