Exemple #1
0
    public void reset()
    {
        if (newPassword.Text != "" && newPassword2.Text != "" && oldPassword.Text != "")
        {
            if (newPassword.Text.Trim().Length < 4 || newPassword.Text.Trim().Length > 10)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001361", "密码长度必须在4到10之间!") + "')</script>");
                return;
            }
            if (newPassword.Text != newPassword2.Text)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001617", "两次密码不一样!") + "')</script>");
                return;
            }
            string Member  = Session["Member"].ToString();
            string NewPass = Encryption.Encryption.GetEncryptionPwd(this.newPassword.Text.ToString(), Session["Member"].ToString());
            string oldPass = Encryption.Encryption.GetEncryptionPwd(this.oldPassword.Text.ToString(), Session["Member"].ToString());
            int    n       = PwdModifyBLL.check(Member, oldPass, int.Parse(this.passtype.SelectedValue));
            string str     = "";
            if (int.Parse(this.passtype.SelectedValue) == 0)
            {
                str = GetTran("006057", "一级密码");
            }
            else
            {
                str = GetTran("006056", "二级密码");
            }
            if (n > 0)
            {
                BLL.CommonClass.ChangeLogs cl_h_info = new BLL.CommonClass.ChangeLogs("Memberinfo", "ltrim(rtrim(number))");
                cl_h_info.AddRecord(Member);

                int i = 0;
                i = PwdModifyBLL.updateMemberPass(Member, NewPass, int.Parse(this.passtype.SelectedValue));
                if (i > 0)
                {
                    cl_h_info.AddRecord(Member);
                    cl_h_info.ModifiedIntoLogs(BLL.CommonClass.ChangeCategory.member3, Session["Member"].ToString(), BLL.CommonClass.ENUM_USERTYPE.objecttype6);
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + str + GetTran("000222", "修改成功") + "')</script>");
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + str + GetTran("000225", "修改失败!") + "')</script>");
                }
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001624", "原始密码不正确,请准确填写!") + "')</script>");
                return;
            }
        }
        else
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001626", "密码不能为空!") + "')</script>");

            return;
        }
    }
Exemple #2
0
    public void reset()
    {
        var passtype = 0;
        var str      = "";

        if (inlineRadio1.Checked)
        {
            passtype = 0;
            str      = "登录密码";
        }
        else
        {
            passtype = 1;
            str      = "支付密码";
        }
        var member = Session["Member"];

        if (member != null)
        {
            var number  = member.ToString();
            var NewPass = Encryption.Encryption.GetEncryptionPwd(this.newPassword.Text.ToString(), number);
            var oldPass = Encryption.Encryption.GetEncryptionPwd(this.oldPassword.Text.ToString(), number);
            int n       = PwdModifyBLL.check(number, oldPass, passtype);

            if (n > 0)
            {
                BLL.CommonClass.ChangeLogs cl_h_info = new BLL.CommonClass.ChangeLogs("Memberinfo", "ltrim(rtrim(number))");
                cl_h_info.AddRecord(number);

                int i = 0;
                i = PwdModifyBLL.updateMemberPass(number, NewPass, passtype);
                if (i > 0)
                {
                    cl_h_info.AddRecord(number);
                    cl_h_info.ModifiedIntoLogs(BLL.CommonClass.ChangeCategory.member3, number, BLL.CommonClass.ENUM_USERTYPE.objecttype6);
                    Response.Redirect("SettingsIndex.aspx?res=success&&type=fanhui");
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + str + "修改成功" + "')</script>");
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + str + "修改失败!" + "')</script>");
                }
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('原始密码不正确,请准确填写!')</script>");
                return;
            }
        }
    }
Exemple #3
0
    /// <summary>
    /// 登陆事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string number = Session["Member"].ToString();

        //检验
        if (this.txtbankcard.Text.Trim() == "")
        {
            msg = "<script language='javascript'>alert('" + GetTran("007761", "请输入银行卡!") + "');</script>";
            return;
        }
        if (this.txtPwd.Text.Trim() == "")
        {
            msg = "<script language='javascript'>alert('" + GetTran("005598", "请输入密码!") + "');</script>";
            return;
        }

        string oldPass = Encryption.Encryption.GetEncryptionPwd(this.txtPwd.Text.ToString(), Session["Member"].ToString());
        int    n       = PwdModifyBLL.check(Session["Member"].ToString(), oldPass, 1);

        if (n > 0)
        {
            string bankcode        = this.ddlscbank.SelectedValue;
            string BankCard        = this.txtbankcard.Text;
            string bankbanchname   = txtbankbanchname.Text;
            MemberInfoModifyBll mf = new MemberInfoModifyBll();
            int c = DBHelper.ExecuteNonQuery(" update   memberinfo set Bankbranchname='" + bankbanchname + "' ,  BankCard='" + BankCard + "',bankcode='" + bankcode + "' where  number='" + number + "' ");
            if (c > 0)
            {
                msg = "<script language='javascript'>alert(' " + GetTran("000222", "") + "  '); window.location.href='first.aspx';</script>";
                return;
            }
            else
            {
                msg = "<script language='javascript'>alert(' " + GetTran("000225", "") + "');</script>";
                return;
            }
        }
        else
        {
            msg = "<script language='javascript'>alert(' " + GetTran("006058", "") + "');</script>";
            return;
        }
    }
Exemple #4
0
 protected void btn_submit_Click(object sender, EventArgs e)
 {
     if (Session["Member"] == null)
     {
         Response.Redirect("../index.aspx");
     }
     else
     {
         if (Session["smscode"] == null || Session["smscode"] == "")
         {
             ScriptHelper.SetAlert(Page, "验证码不正确!");
             return;
         }
         string sms = Session["smscode"].ToString();
         if (yzm.Text != sms)
         {
             ScriptHelper.SetAlert(Page, "验证码不正确!");
             return;
         }
         var    number  = Session["Member"].ToString();
         string oldPass = Encryption.Encryption.GetEncryptionPwd(this.txtPassword.Text.ToString(), number);
         int    n       = PwdModifyBLL.check(number, oldPass, 1);
         if (n > 0)
         {
             if (type == "setpwd")
             {
                 Response.Redirect("../PhoneSettings/ChangePassword.aspx?type=" + type);
                 return;
             }
             else
             {
                 Response.Redirect("../PhoneSettings/" + url + ".aspx?res=success&&type=" + type);
                 return;
             }
         }
         else
         {
             ScriptHelper.SetAlert(Page, "二级密码不正确!");
             return;
         }
     }
 }
Exemple #5
0
    /// <summary>
    /// 支付按钮事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnsure_Click(object sender, EventArgs e)
    {
        double currency = AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()));
        int    res      = -1;
        string usemoney = lbltotalmoney.Text.Trim();
        string billid   = ViewState["billid"].ToString();
        int    roletype = Convert.ToInt32(ViewState["roletype"]);
        int    dotype   = Convert.ToInt32(ViewState["dotype"]);

        loginnumber = ViewState["loginnumber"].ToString();

        string curip = Request.UserHostAddress.ToString();

        if (!rdorempay.Checked)  //非离线支付
        {
            if (ViewState["remid"] != null)
            {
                RemittancesDAL.DelRemittancesrelationremtemp(ViewState["remid"].ToString());
            }
        }
        else //使用离线支付方式
        {
            if (ViewState["remid"] != null)
            {
                RemittancesDAL.UPRemittancesre(ViewState["remid"].ToString());
            }
        }

        if (rdoonlinepay.Checked)  //在线支付
        {
            string hkid = billid;
            ClientScript.RegisterStartupScript(GetType(), "msg", "alert('该功能正在开发中,请耐心等候!!!');", true);
            return;

            if (dotype == 1)
            {
                hkid = RemittancesDAL.AddRemittancebytypeOnline(billid, roletype, curip, loginnumber, 1);
            }
            else if (dotype == 2)
            {
                RemittancesDAL.UpdateOnlinepayway(billid, 4);
            }

            string posturl = Getposturl(hkid);

            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>window.open ('" + posturl + "');</script>");
            this.btnsure.Enabled = false;
            return;
        }
        else if (rdorempay.Checked)  //离线支付
        {
            //usemoney = (double.Parse(lblrmb.Text.Trim()) * currency).ToString();
            usemoney = double.Parse(lblrmb.Text.Trim()).ToString("0.00");
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("100" + "," + billid + "," + usemoney) + "';</script>");
            return;
        }
        else if (rdostorepay.Checked)  //去店铺支付
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("101" + "," + billid + "," + usemoney) + "';</script>");
            return;
        }
        else if (rdoectpay.Checked)                                     //会员电子货币支付
        {
            if (MemberOrderDAL.Getvalidteiscanpay(billid, loginnumber)) //限制订单必须有订货所属店铺推荐人协助人支付)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007452", "该订单不属于您的协助或推荐报单,不能完成支付!") + "'); window.location.href='../Logout.aspx'; </script>");
                return;
            }
            if (ViewState["odnumber"].ToString() != loginnumber)//如果不是自己给自己支付
            {
                if (this.rdombsuregetmoney.SelectedValue == "0")
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007455", "请确认已收到该会员支付的报单金额") + "');   </script>");
                    return;
                }
            }
            if (this.txtadvpass.Text == "")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("006656", "二级密码不能为空!") + "');</script>");
                return;
            }
            string oldPass = Encryption.Encryption.GetEncryptionPwd(this.txtadvpass.Text.ToString(), loginnumber);
            int    n       = PwdModifyBLL.check(loginnumber, oldPass, 1);
            if (n <= 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("006058", "二级密码不正确!") + "'); </script>");
                return;
            }

            if (MemberInfoDAL.CheckState(Session["Member"].ToString()))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007456", "会员账户已冻结,不能完成支付!") + "'); </script>");
                return;
            }


            DataTable dt_one    = DAL.DBHelper.ExecuteDataTable("select ordertype from MemberOrder where OrderID=" + billid);
            string    ordertype = dt_one.Rows[0]["ordertype"].ToString();//订单类型
            int       act;
            if (ordertype == "22" || ordertype == "12")
            {
                act = Convert.ToInt32(rdoaccounttype2.SelectedValue);
            }
            else if (ordertype == "25")
            {
                act = Convert.ToInt32(rdoaccounttype3.SelectedValue);
            }
            else
            {
                act = Convert.ToInt32(rdoaccounttype.SelectedValue);
            }

            res = AddOrderDataDAL.OrderPayment(loginnumber, billid, curip, roletype, dotype, act, loginnumber, "", 2, -1, 1, 1, "", double.Parse(usemoney), "");
            this.btnsure.Enabled = false;
        }
        else if (rdostpaymb.Checked)                                    //店铺支付 会员订单
        {
            if (MemberOrderDAL.Getvalidteiscanpay(billid, loginnumber)) //限制订单必须有订货所属店铺推荐人协助人支付)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007452", "该订单不属于您的协助或推荐报单,不能完成支付!") + "'); window.location.href='../Logout.aspx'; </script>");
                return;
            }
            if (this.rdoisagree.SelectedValue == "0") //验证是否确认收到款
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007455", "请确认已收到该会员支付的报单金额") + "!');   </script>");
                return;
            }
            if (this.txtpayadbpass.Text == "")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("006656", "二级密码不能为空!") + "');</script>");
                return;
            }
            string oldPass = Encryption.Encryption.GetEncryptionPwd(this.txtpayadbpass.Text.ToString(), Session["Store"].ToString());
            int    n       = PwdModifyBLL.checkstore(loginnumber, oldPass, 1);
            if (n <= 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("006058", "二级密码不正确!") + "'); </script>");
                return;
            }

            int act = Convert.ToInt32(rdostactypepaymb.SelectedValue);
            res = AddOrderDataDAL.OrderPayment(loginnumber, billid, curip, 2, 3, act, loginnumber, "", 5, -1, 1, 1, "", double.Parse(usemoney), "");
            this.btnsure.Enabled = false;
        }
        else if (rdostopayorder.Checked)  //店铺电子账户支付 订货单
        {
            if (this.txtstadvpass.Text == "")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("006656", "二级密码不能为空!") + "');</script>");
                return;
            }
            string oldPass = Encryption.Encryption.GetEncryptionPwd(this.txtstadvpass.Text.ToString(), Session["Store"].ToString());
            int    n       = PwdModifyBLL.checkstore(loginnumber, oldPass, 1);
            if (n <= 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("006058", "二级密码不正确!") + "'); </script>");

                return;
            }
            int act = Convert.ToInt32(rdostaccount.SelectedValue);

            res = AddOrderDataDAL.OrderPayment(loginnumber, billid, curip, roletype, dotype, act, loginnumber, "", 2, -1, 1, 1, "", double.Parse(usemoney), ""); this.btnsure.Enabled = false;
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("000000", "请至少选择一种支付方式!") + "'); </script>");
            return;
        }

        PublicClass.SendMsg(1, billid, "");

        ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt(res.ToString() + "," + billid + "," + usemoney) + "';</script>");
        return;
    }
Exemple #6
0
    /// <summary>
    /// 注册报单流程(包括判断)
    /// 调用逻辑层中的所有方法
    /// </summary>
    public void AddOrderAndInfoProcess()
    {
        string xjnumber  = lblxjnumber.Text;
        string placement = this.hidplacemnet.Value;
        string direct    = hiddirect.Value;

        if (placement == "")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('安置编号不能为空');</script>", false);
            return;
        }

        if (placement == xjnumber)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('安置编号不能与会员编号相同');</script>", false);
            return;
        }
        string GetError1 = new AjaxClass().CheckNumberNetAn(direct, placement);

        if (GetError1 != null && GetError1 != "")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('安置编号必须在推荐编号的安置网络下面!');</script>", false);
            return;
        }
        if (Convert.ToInt32(DAL.DBHelper.ExecuteScalar("select COUNT(0) from MemberInfo where   MemberState in(0,2) and Number='" + CommonDataBLL.quanjiao(direct) + "'")) != 0)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('推荐编号未激活');</script>", false);
            return;
        }

        if (Convert.ToInt32(DAL.DBHelper.ExecuteScalar("select COUNT(0) from MemberInfo where MemberState in(0,2) and Number='" + CommonDataBLL.quanjiao(placement) + "'")) != 0)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('请先激活当前会员的安置人,或重新设置安置编号!');</script>", false);
            return;
        }


        string placement_check = registermemberBLL.GetHavePlacedOrDriect(xjnumber, "", placement, direct);

        if (placement_check != null)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + placement_check + "');</script>", false);
            return;
        }

        string pass = txtpassword.Text;

        if (pass == "")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('请输入二级密码!');</script>", false);
            return;
        }

        string EnPass = Encryption.Encryption.GetEncryptionPwd(pass, direct);
        int    n      = PwdModifyBLL.check(direct, EnPass, 1);

        if (n <= 0)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('二级密码不正确!');</script>", false);
            return;
        }



        string District = hidDistrict.Value;

        if (placement != "8888888888")
        {
            if (DBHelper.ExecuteScalar("select count(0) from memberinfo where placement='" + placement + "' and District=" + District + "  and  memberstate=1 ").ToString() != "0")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('安置人所选区位已有人安置!');</script>", false);
                return;
            }
        }
        string         orderid = hidorderid.Value;
        int            maxexp  = BLL.CommonClass.CommonDataBLL.getMaxqishu();
        string         curip   = Request.UserHostAddress.ToString();
        int            rec     = -1;
        SqlConnection  conn    = null;
        SqlTransaction tran    = null;

        try
        {
            conn = DBHelper.SqlCon();
            conn.Open();
            tran = conn.BeginTransaction();

            string         sql = " update memberinfo  set  placement=@placement ,District=" + District + "   where  number=@number ";
            SqlParameter[] sps = new SqlParameter[] {
                new SqlParameter("@placement", placement),
                new SqlParameter("@number", xjnumber)
            };
            rec = DBHelper.ExecuteNonQuery(tran, sql, sps, CommandType.Text);



            rec = AddOrderDataDAL.OrderPayment(tran, direct, orderid, curip, 1, 1, 1, direct, "", 2, -1, 1, 1, "", 0, "");
            if (rec == 0)
            {
                tran.Commit();
                //ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('激活会员成功!');window.location.href='BrowseMemberOrders.aspx'</script>");
                // Response.Redirect("../payserver/chosepaysjpay.aspx?blif=" + EncryKey.GetEncryptstr(orderid, 1, 1) + "");
            }
            else
            if (rec == 2)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('可用石斛积分不足,激活失败!');</script>");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('安置激活失败,请重新输入安置编号!');</script>");
                this.hidplacemnet.Value = "";
                this.txtplacemnet.Text  = "";
            }
        }
        catch (Exception)
        {
            tran.Rollback();
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('安置激活失败!');</script>");
            this.hidplacemnet.Value = "";
            this.txtplacemnet.Text  = "";
        }
        finally {
            tran.Dispose();
            conn.Close();
            conn.Dispose();
        }
        double jbb = Convert.ToDouble(lblkcjb.Text);

        ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='../payserver/payerror1.aspx?ef=" + EncryKey.Encrypt(rec.ToString() + "," + orderid + "," + jbb) + "';</script>");
    }