示例#1
0
        protected void button5_ServerClick(object sender, EventArgs e)
        {
            if (!BCST.Common.CommonManager.Web.CheckPostSource())
                return;

            BLL.Member member = new BLL.Member();
            //string password = hidPwd2.Value.Trim();//txtPassword.Text.Trim();
            string password = txtPassword.Text.Trim();
            if (!member.CompareLoginPassword(UserLoginInfo.UserID, password))
            {
                lblMsg.Text = "�Բ���������ĵ�¼��������";
                return;
            }

            if (dd_11.Visible)
            {
                if (string.IsNullOrEmpty(txtOldTwoPass.Text.Trim()))
                {
                    lblMsg.Text = "������ԭ�������룡";
                    return;
                }
                if (!member.CompareTwoPassword(UserLoginInfo.UserID, txtOldTwoPass.Text.Trim()))
                {
                    lblMsg.Text = "�Բ����������ԭ������������";
                    return;
                }
            }

            string cardType = Common.FilterString(ddlCardType.SelectedValue);
            string cardNo = Common.FilterString(txtCardNo.Text.Trim());
            string question = Common.FilterString(ddlQuestion.SelectedValue);
            string answer = Common.FilterString(txtAnwer.Text.Trim());
            string twoPass = Common.FilterString(txtTwoPass.Text.Trim());

            int iRows = 0;
            if (dd_5.Visible)
            {
                iRows = member.UpdateTwoPassInfo(UserLoginInfo.UserID, cardType, cardNo, question, answer, twoPass);
            }
            else if (!string.IsNullOrEmpty(twoPass))
            {
                // iRows = member.UpdateTwoPass(UserLoginInfo.UserID, twoPass);
                iRows = member.UpdateTwoPass(UserLoginInfo.UserID, cardNo, answer, twoPass);
            }
            else
            {
                lblMsg.Text = "�������벻��Ϊ�գ�" + DateTime.Now;
                return;
            }

            if (iRows > 0)
            {
                if (dd_5.Visible)
                {
                    lblMsg.Text = "�������뱣���������óɹ���" + DateTime.Now;
                }
                else
                {
                    lblMsg.Text = "���������޸ijɹ���" + DateTime.Now;
                }
                Hidden();
                //lblMsg.Text = "�������뱣�������޸ijɹ���" + DateTime.Now;
                //Hidden();
            }
            else if (iRows == -9)
            {
                lblMsg.Text = "��Ǹ������д��֤�����������𰸲�����δ���޸��������룬���������룡";
                Hidden();
            }
            else
            {
                lblMsg.Text = "��Ǹ�������޸�ʧ�ܣ������Ƿ�������æ�����Ժ����ԣ�";
            }
        }
示例#2
0
        protected void button5_ServerClick(object sender, EventArgs e)
        {
            if (!BCST.Common.CommonManager.Web.CheckPostSource())
            {
                return;
            }

            BLL.Member member = new BLL.Member();
            //string password = hidPwd2.Value.Trim();//txtPassword.Text.Trim();
            string password = txtPassword.Text.Trim();

            if (!member.CompareLoginPassword(UserLoginInfo.UserID, password))
            {
                lblMsg.Text = "对不起,您输入的登录密码有误!";
                return;
            }

            if (dd_11.Visible)
            {
                if (string.IsNullOrEmpty(txtOldTwoPass.Text.Trim()))
                {
                    lblMsg.Text = "请输入原二级密码!";
                    return;
                }
                if (!member.CompareTwoPassword(UserLoginInfo.UserID, txtOldTwoPass.Text.Trim()))
                {
                    lblMsg.Text = "对不起,您输入的原二级密码有误!";
                    return;
                }
            }

            string cardType = Common.FilterString(ddlCardType.SelectedValue);
            string cardNo   = Common.FilterString(txtCardNo.Text.Trim());
            string question = Common.FilterString(ddlQuestion.SelectedValue);
            string answer   = Common.FilterString(txtAnwer.Text.Trim());
            string twoPass  = Common.FilterString(txtTwoPass.Text.Trim());

            int iRows = 0;

            if (dd_5.Visible)
            {
                iRows = member.UpdateTwoPassInfo(UserLoginInfo.UserID, cardType, cardNo, question, answer, twoPass);
            }
            else if (!string.IsNullOrEmpty(twoPass))
            {
                // iRows = member.UpdateTwoPass(UserLoginInfo.UserID, twoPass);
                iRows = member.UpdateTwoPass(UserLoginInfo.UserID, cardNo, answer, twoPass);
            }
            else
            {
                lblMsg.Text = "银行密码不能为空!" + DateTime.Now;
                return;
            }

            if (iRows > 0)
            {
                if (dd_5.Visible)
                {
                    lblMsg.Text = "银行密码保护资料设置成功!" + DateTime.Now;
                }
                else
                {
                    lblMsg.Text = "银行密码修改成功!" + DateTime.Now;
                }
                Hidden();
                //lblMsg.Text = "银行密码保护资料修改成功!" + DateTime.Now;
                //Hidden();
            }
            else if (iRows == -9)
            {
                lblMsg.Text = "抱歉,您填写的证件号码或问题答案不符,未能修改银行密码,请重新输入!";
                Hidden();
            }
            else
            {
                lblMsg.Text = "抱歉,资料修改失败,可能是服务器繁忙,请稍候再试!";
            }
        }