Example #1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        string strLoginName = "cn001";
        string strPassword  = "******";

        //判断支付密码
        Tz888.BLL.PayPwd payDll    = new Tz888.BLL.PayPwd();
        Tz888.BLL.Pay    paypwdDll = new Tz888.BLL.Pay();
        if (tzWeb.pay.comm.isSetPwd(strLoginName))//设置了支付密码 则使用支付验证
        {
            DataTable dtpaypwd = payDll.valiPayPwd(strLoginName, txtPwd.Value.Trim());
            if (dtpaypwd.Rows.Count > 0)//支付密码正确
            {
                Tz888.BLL.Pay1.PayOrder bll = new Tz888.BLL.Pay1.PayOrder();
                //bool b = bll.accountPaySuccess(orderNo, strLoginName, lblorderby_no.Text.ToString().Trim(), lblUser_no.Text.ToString().Trim());
                bool b = true;
                if (b)
                {
                    bll.AddLmOrder(orderNo, strLoginName, lblorderby_no.Text.ToString().Trim(), lblUser_no.Text.ToString().Trim());

                    Response.Write("<script>alert('结算成功!');window.location.href='../Pay/UserMoney.aspx?Money=" + lblorder_no.Text.ToString().Trim() + "&order_no=" + orderNo + "';</script>");
                }
                else
                {
                    Response.Write("<script>alert('支付失败!');</script>");
                }
            }
            else
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('密码不正确点击确认找回密码!');location.href='getPayPwd.aspx'", true);
                return;
            }
        }
        else//按照登录密码验证
        {
            //判断登录密码
            DataTable dtLoginPwd = payDll.valiLoginPwd(strLoginName, txtPwd.Value.Trim());
            if (dtLoginPwd.Rows.Count > 0)
            {
                Tz888.BLL.Pay1.PayOrder bll = new Tz888.BLL.Pay1.PayOrder();
                bool b = bll.accountPaySuccess(orderNo, strLoginName, lblorderby_no.Text.ToString().Trim(), lblUser_no.Text.ToString().Trim());
                if (b)
                {
                    bll.AddLmOrder(orderNo, strLoginName, lblorderby_no.Text.ToString().Trim(), lblUser_no.Text.ToString().Trim());

                    Response.Write("<script>alert('结算成功!');window.location.href='../Pay/UserMoney.aspx?Money=" + lblorder_no.Text.ToString().Trim() + "&order_no=" + orderNo + "';</script>");
                }
                else
                {
                    Response.Write("<script>alert('支付失败!');</script>");
                }
            }
            else
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('密码错误!您没有设置支付密码,默认为登录密码!')", true);
                return;
            }
        }
    }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "")
     {
         Response.Redirect("../Login.aspx");
     }
     loginname = Page.User.Identity.Name;
     Tz888.BLL.PayPwd dal = new Tz888.BLL.PayPwd();
     question         = dal.isAsk(loginname);
     lblQuestion.Text = question;
     btnSetPwd.Attributes.Add("onclick", "return chkpwd();");
 }
Example #3
0
    protected void btnSetPwd_Click(object sender, EventArgs e)
    {
        Tz888.BLL.PayPwd dal = new Tz888.BLL.PayPwd();
        bool             b   = dal.changePayPwd(loginname, txtPayPwd1.Value.Trim());//修改密码

        if (b)
        {
            Tz888.Common.MessageBox.Show(this.Page, "支付密码修改成功!");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "支付密码修改失败,请重试!");
        }
    }
Example #4
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        string ValliDate = Request.QueryString["Validate"].ToString().Trim();
        string vadate    = Request.QueryString["vadate"].ToString().Trim();

        if (ValliDate != "")
        {
            string strLoginName = Page.User.Identity.Name;
            string strPassword  = txtPwd.Value.Trim();
            //判断支付密码
            Tz888.BLL.PayPwd payDll    = new Tz888.BLL.PayPwd();
            Tz888.BLL.Pay    paypwdDll = new Tz888.BLL.Pay();
            if (tzWeb.pay.comm.isSetPwd(strLoginName))//设置了支付密码 则使用支付验证
            {
                DataTable dtpaypwd = payDll.valiPayPwd(strLoginName, txtPwd.Value.Trim());
                if (dtpaypwd.Rows.Count > 0)//支付密码正确
                {
                    Tz888.BLL.Pay1.PayOrder bll = new Tz888.BLL.Pay1.PayOrder();
                    bool b = bll.VipaccountPaySuccess(orderNo, strLoginName, lblorderby_no.Text.ToString().Trim(), lblUser_no.Text.ToString().Trim(), ValliDate, vadate.ToString().Trim());
                    if (b)
                    {
                        Response.Write("<script>alert('结算成功!');window.location.href='../../Pay/UserMoney.aspx?Money=" + lblorder_no.Text.ToString().Trim() + "&order_no=" + orderNo + "';</script>");
                    }
                    else
                    {
                        Response.Write("<script>alert('支付失败!');</script>");
                    }
                }
                else
                {
                    this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('密码不正确点击确认找回密码!');location.href='../getPayPwd.aspx'", true);
                    return;
                }
            }
            else//按照登录密码验证
            {
                //判断登录密码
                DataTable dtLoginPwd = payDll.valiLoginPwd(strLoginName, txtPwd.Value.Trim());
                if (dtLoginPwd.Rows.Count > 0)
                {
                    Tz888.BLL.Pay1.PayOrder bll = new Tz888.BLL.Pay1.PayOrder();
                    bool b = bll.VipaccountPaySuccess(orderNo, strLoginName, lblorderby_no.Text.ToString().Trim(), lblUser_no.Text.ToString().Trim(), ValliDate, vadate.ToString().Trim());
                    if (b)
                    {
                        Response.Write("<script>alert('结算成功!');window.location.href='../../Pay/UserMoney.aspx?Money=" + lblorder_no.Text.ToString().Trim() + "&order_no=" + orderNo + "';</script>");
                    }
                    else
                    {
                        Response.Write("<script>alert('支付失败!');</script>");
                    }
                }
                else
                {
                    this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('密码错误!您没有设置支付密码,默认为登录密码!')", true);
                    return;
                }
            }
        }
        else
        {
            Response.Write("<script>alert('出现异常请稍后再试!');window.location.href='VipManage.aspx';</script>");
        }
    }