Пример #1
0
        public void BindInfo()
        {
            if (Session["getpwduser"] == null)
            {
                Response.Redirect("/Manage/GetPass.aspx");
            }

            BindCardType();
            BindQuestion();

            BLL.Member member = new BLL.Member();
            DataRow    dr     = member.GetInfoByName(Session["getpwduser"].ToString());

            if (dr == null)
            {
                return;
            }
            string dbCardType = dr["ZJ_Type"].ToString();
            //txtCardNo.Text = dr["ZJ_Number"].ToString();
            //txtCardNo2.Text = txtCardNo.Text;
            string dbQuestion = dr["Pwd_ques"].ToString();

            //txtAnwer.Text = dr["Pwd_anw"].ToString();

            for (int i = 0; i < ddlCardType.Items.Count; i++)
            {
                if (ddlCardType.Items[i].Value.ToLower() == dbCardType.Trim().ToLower())
                {
                    ddlCardType.SelectedIndex = i;
                    break;
                }
            }

            for (int i = 0; i < ddlQuestion.Items.Count; i++)
            {
                if (ddlQuestion.Items[i].Value.ToLower() == dbQuestion.Trim().ToLower())
                {
                    ddlQuestion.SelectedIndex = i;
                    break;
                }
            }
        }
Пример #2
0
        public void BindInfo()
        {
            if (Session["getpwduser"] == null)
            {
                Response.Redirect("/Manage/GetPass.aspx");
            }

            BindCardType();
            BindQuestion();

            BLL.Member member = new BLL.Member();
            DataRow dr = member.GetInfoByName(Session["getpwduser"].ToString());
            if (dr == null)
            {
                return;
            }
            string dbCardType = dr["ZJ_Type"].ToString();
            //txtCardNo.Text = dr["ZJ_Number"].ToString();
            //txtCardNo2.Text = txtCardNo.Text;
            string dbQuestion = dr["Pwd_ques"].ToString();
            //txtAnwer.Text = dr["Pwd_anw"].ToString();

            for (int i = 0; i < ddlCardType.Items.Count; i++)
            {
                if (ddlCardType.Items[i].Value.ToLower() == dbCardType.Trim().ToLower())
                {
                    ddlCardType.SelectedIndex = i;
                    break;
                }
            }

            for (int i = 0; i < ddlQuestion.Items.Count; i++)
            {
                if (ddlQuestion.Items[i].Value.ToLower() == dbQuestion.Trim().ToLower())
                {
                    ddlQuestion.SelectedIndex = i;
                    break;
                }
            }
        }