protected void rep1_ItemCommand(object source, RepeaterCommandEventArgs e) { string billid = EncryKey.GetEncryptstr(e.CommandArgument.ToString(), 2, 1); ScriptManager.RegisterStartupScript(this, GetType(), "mag", "var formobj=document.createElement('form');" + "formobj.action='../payserver/chosepaysj.aspx?blif=" + billid + "';" + "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();", true); // Page.ClientScript.RegisterStartupScript(GetType(), null, "<script language='javascript'>window.open('../payserver/chosepay.aspx?blif=" + billid + "');</script>"); return; }
protected void linkbtnOK_Click(object sender, CommandEventArgs e) { if (MemberOrderDAL.Getvalidteiscanpay(e.CommandArgument.ToString(), Session["Member"].ToString()))//限制订单必须有订货所属店铺推荐人协助人支付) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007452", "该订单不属于您的协助或推荐报单,不能完成支付!") + "'); window.location.href='../Logout.aspx'; </script>"); return; } //ScriptManager.RegisterStartupScript(this, GetType(), "mag", "var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(e.CommandArgument.ToString(), 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();", true); Response.Redirect("../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(e.CommandArgument.ToString(), 1, 1)); //Response.Redirect("chosepay.aspx?rd=" + e.CommandArgument.ToString() + "&rt=1"); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Store"] != null) { Literal1.Text = "<a href='../Store/First.aspx'>我的首页</a><a href='../Store/auditingmemberorders.aspx'>注册确认</a><a href='../Store/auditingmemberagain.aspx'>复消确认</a><a href='../Store/CheckOutOrders.aspx'>订单支付</a><a href='../Store/ViewAccountCircs.aspx'>充值浏览</a><a href='../Logout.aspx'>退出系统</a>"; } if (Session["Member"] != null) { Literal1.Text = "<a href='../Member/First.aspx'>我的首页</a><a href='../Member/AuditingMemberOrder.aspx'>报单支付</a><a href='../Member/ResultBrowse.aspx'>充值浏览</a><a href='../Logout.aspx'>退出系统</a>"; } //获取标准币种 bzCurrency = CommonDataBLL.GetStandard(); if (!IsPostBack) { double currency = AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())); if (Request.QueryString["ef"] != null) { string ef = EncryKey.Decrypt(Request.QueryString["ef"].ToUpper()).ToString(); string typ = ""; double money = 0; string bill = ""; string[] sf = ef.Split(','); if (sf.Length >= 3) { typ = sf[0].ToString(); bill = sf[1].ToString(); money = Convert.ToDouble(sf[2]); } else { typ = ef; } string showinfo = ""; switch (typ) { case "0": //showinfo = GetTran("007512", "成功支付订单") + bill + " ," + GetTran("000789", "支付金额") + ":" + double.Parse(money.ToString("0.00")) / currency + GetTran("000564", "元"); showinfo = GetTran("007512", "成功支付订单") + bill + " ," + GetTran("000789", "支付金额") + ":" + double.Parse(money.ToString("0.00")) + GetTran("000564", "元"); break; case "1": showinfo = GetTran("007513", "支付失败,订单已支付或订单号不存在"); break; case "2": showinfo = GetTran("007514", "支付失败,账户可用余额不足"); break; case "3": showinfo = GetTran("007515", "支付失败,账户类型不存在"); break; case "4": showinfo = GetTran("007370", "未到账"); break; case "5": showinfo = GetTran("007516", "支付失败,服务机构周转款不足"); break; case "6": showinfo = GetTran("007517", "支付失败,服务机构订货款不足"); break; case "100": //showinfo = GetTran("007518", "请您务必在 24 小时内完成向指定账户汇款") + double.Parse(money.ToString("0.00")) / currency + GetTran("000564", "元") + "," + GetTran("007519", "否则将视为您自动放弃汇款"); showinfo = GetTran("007518", "请您务必在 24 小时内完成向指定账户汇款") + double.Parse(money.ToString("0.00")) + GetTran("000564", "元") + "," + GetTran("007519", "否则将视为您自动放弃汇款"); break; case "101": //showinfo = GetTran("007520", "请将") + bill + GetTran("007521", "订单款额") + double.Parse(money.ToString("0.00")) / currency + GetTran("000564", "元") + GetTran("007522", "交给您的购货店铺,并要求其为您支付订单"); showinfo = GetTran("007520", "请将") + bill + GetTran("007521", "订单款额") + double.Parse(money.ToString("0.00")) + GetTran("000564", "元") + GetTran("007522", "交给您的购货店铺,并要求其为您支付订单"); break; default: showinfo = GetTran("007523", "未知错误"); break; } lblinfo.Text = showinfo; } } }
protected void Page_Load(object sender, EventArgs e) { bzCurrency = CommonDataBLL.GetStandard(); huilv = Convert.ToDouble(Common.GetnowPrice()); if (!IsPostBack) { if (Request.QueryString["ef"] != null) { string ef = EncryKey.Decrypt(Request.QueryString["ef"].ToUpper()).ToString();//"0,171101092822,1400.00" string typ = ""; double money = 0; string bill = ""; string[] sf = ef.Split(','); if (sf.Length >= 3) { typ = sf[0].ToString(); //0 bill = sf[1].ToString(); //"171101092822" money = Convert.ToDouble(sf[2]); //1400.00 DataTable dtt = DAL.DBHelper.ExecuteDataTable("select ordertype, totalmoney,totalpv from memberorder where orderid ='" + bill + "' "); if (dtt != null && dtt.Rows.Count > 0) { int ordertype = Convert.ToInt32(dtt.Rows[0]["ordertype"]); double m = Convert.ToDouble(dtt.Rows[0]["totalmoney"]); double pv = Convert.ToDouble(dtt.Rows[0]["totalpv"]); if (ordertype == 22 || ordertype == 12) { money = m; } else { money = pv; } } } else { typ = ef; } string showinfo = ""; switch (typ) { case "0": showinfo = "支付成功:" + money; break; case "1": showinfo = GetTran("007513", "支付失败,订单已支付或订单号不存在"); break; case "2": showinfo = GetTran("007514", "支付失败,账户可用余额不足"); break; case "3": showinfo = GetTran("007515", "支付失败,账户类型不存在"); break; case "4": showinfo = GetTran("007370", "未到账"); break; case "5": showinfo = GetTran("007516", "支付失败,服务机构周转款不足"); break; case "6": showinfo = GetTran("007517", "支付失败,服务机构订货款不足"); break; case "100": showinfo = GetTran("007518", "请您务必在 24 小时内完成向指定账户汇款") + ":" + (huilv == 1 ? "$" : "¥") + (money).ToString("f2") + "," + GetTran("007519", "否则将视为您自动放弃汇款"); break; case "101": showinfo = GetTran("007520", "请将") + bill + GetTran("007521", "订单款额") + (huilv == 1 ? "$" : "¥") + (money).ToString("f2") + GetTran("007522", "交给您的购货店铺,并要求其为您支付订单"); break; default: showinfo = GetTran("007523", "未知错误"); break; } if (typ != "0" && typ != "100" && typ != "101") { cg.Visible = false; sb.Visible = true; } if (typ == "0") { cg.Visible = true; sb.Visible = false; } if (typ == "100") { cg.Visible = true; sb.Visible = false; } lblinfo.Text = showinfo; } } }
protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Del") { ChangeLogs cl = new ChangeLogs("Remittances", "ltrim(rtrim(str(id)))"); if (e.CommandArgument.ToString() == string.Empty) { return; } //得到更新的id //string updId = ((HtmlInputHidden)this.GridView1.SelectedRow.FindControl("HidId")).Value; GridViewRow gvrow = (GridViewRow)(((Image)e.CommandSource).NamingContainer); string updId = (this.GridView2.Rows[gvrow.RowIndex].FindControl("HidId") as HtmlInputHidden).Value; //判断汇款是否被删除 bool blean = RemittancesBLL.MemberIsExist(int.Parse(updId)); if (blean == false) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("000861", "不能重复删除!") + "')</script>"); return; } cl.AddRecord(updId); if (updId == "" || updId == null) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000855", "参数出错!") + "')</script>"); return; } //判断是否审核,不能删除已审核的单子 Object obj = RemittancesBLL.IsMemberGSQR(int.Parse(updId)); try { bool b = bool.Parse(obj.ToString()); if (b == true) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("000867", "不能删除已审核的单子!") + "')</script>"); return; } } catch { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("000852", "类型转换错误!") + "')</script>"); return; } //删除未审核的单子 RemittancesBLL.DeleteMemberMoney(Convert.ToInt32(updId)); Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000874", "成功删除!") + "')</script>"); BtnConfirm_Click(null, null); cl.AddRecord(updId); cl.ModifiedIntoLogs(ChangeCategory.member1, updId, ENUM_USERTYPE.objecttype5); } else if (e.CommandName == "Pay") { string billid = EncryKey.GetEncryptstr(e.CommandArgument.ToString(), 2, 1); ScriptManager.RegisterStartupScript(this, GetType(), "mag", "var formobj=document.createElement('form');" + "formobj.action='../payserver/chosepay.aspx?blif=" + billid + "';" + "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();", true); // Page.ClientScript.RegisterStartupScript(GetType(), null, "<script language='javascript'>window.open('../payserver/chosepay.aspx?blif=" + billid + "');</script>"); return; } }
/// <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; }
public void LoadData1() { double currency = AjaxClass.GetCurrency(int.Parse(Session["Default_Currency"] == null ? bzCurrency.ToString() : Session["Default_Currency"].ToString())); string billid = ViewState["billid"].ToString(); int dotype = Convert.ToInt32(ViewState["dotype"]); int roletype = Convert.ToInt32(ViewState["roletype"]); this.lblorderid.Text = billid; MemberOrderModel memberorder = null; DataTable ordergoodstable = null; DataTable dtcb = null; //查询会员汇入银行 string paymentnumber = ""; //被支付订单(汇款单)所属会员编号 double totalmoney = 0; // 被支付订单(汇款单)总金额 if (dotype == 1) //订单支付 { lbltype.Text = GetTran("000907", "订单支付"); lblot.Text = GetTran("000079", "订单号"); } else if (dotype == 2)//充值 { div_1.Style.Add("display", "none"); div_2.Style.Add("display", "none"); div_5.Style.Add("display", "none"); div_6.Style.Add("display", "none"); lbltype.Text = GetTran("007451", "订单支付"); lblot.Text = GetTran("005854", "汇款单号"); ViewState["remid"] = billid; RemittancesModel remittance = RemittancesDAL.GetRemitByHuidan(billid); paymentnumber = remittance.RemitNumber.ToString(); //被支付订单(汇款单)所属会员编号 totalmoney = Convert.ToDouble(remittance.RemitMoney) * currency; // 被支付订单(汇款单)总金额 } if (roletype == 1) //会员 { //隐藏店铺操作 div_6.Style.Add("display", "none"); div_5.Style.Add("display", "none"); if (Session["Member"] != null) { loginnumber = Session["Member"].ToString(); } else if (Session["Store"] != null) { loginnumber = Session["Store"].ToString(); //店铺支付会员订单 div_1.Style.Add("display", "none"); div_2.Style.Add("display", "none"); div_3.Style.Add("display", "none"); div_4.Style.Add("display", "none"); div_6.Style.Add("display", "none"); div_5.Style.Add("display", ""); } if (dotype == 1) //订单支付 { if (MemberOrderDAL.Getvalidteiscanpay(billid, loginnumber)) //限制订单必须有订货所属店铺中心支付) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007452", "该订单不属于您的协助或推荐报单,不能完成支付") + "'); window.location.href='../Logout.aspx'; </script>"); return; } memberorder = MemberOrderDAL.GetMemberOrder(billid); if (loginnumber == "") { loginnumber = memberorder.Number; } else { ViewState["odnumber"] = memberorder.Number; } if (memberorder.Number == loginnumber)//如果是自己支付自己的订单则不需要确认收到款 { div_sure.Visible = false; rdombsuregetmoney.Visible = false; } if (memberorder == null) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("1").ToLower() + "';</script>"); return; } if (memberorder.DefrayState == 1) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("2").ToLower() + "';</script>"); return; } paymentnumber = memberorder.Number.ToString(); //被支付订单(汇款单)所属会员编号 totalmoney = Convert.ToDouble(memberorder.TotalMoney); // 被支付订单(汇款单)总金额 } dtcb = CompanyBankDAL.getdtcompanybankbynumber(loginnumber, 1); } else if (roletype == 2) //店铺 { //隐藏店铺操作 div_2.Style.Add("display", "none"); div_1.Style.Add("display", "none"); div_5.Style.Add("display", "none"); loginnumber = Session["Store"].ToString(); dtcb = CompanyBankDAL.getdtcompanybankbynumber(loginnumber, 2); if (dotype == 1) //订单操作 { ordergoodstable = OrderDetailDAL.Getordergoodstablebyorderid(billid); if (ordergoodstable != null && ordergoodstable.Rows.Count > 0) { if (ordergoodstable.Rows[0]["IsCheckOut"].ToString() == "Y") { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("2").ToLower() + "';</script>"); return; } } else { ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("1").ToLower() + "';</script>"); return; } //paymentnumber = ordergoodstable.Rows[0]["storeid"].ToString();//被支付订单(汇款单)所属会员编号 totalmoney = Convert.ToDouble(ordergoodstable.Rows[0]["totalmoney"]);// 被支付订单(汇款单)总金额 } } lblstoreid1.Text = loginnumber; lblstoreID2.Text = loginnumber; lblordernumber.Text = loginnumber; lbltotalmoney.Text = totalmoney.ToString("0.00"); lblordertmoney.Text = totalmoney.ToString("0.00"); ViewState["tm"] = totalmoney; string cardstr = ""; int i = 1; if (dtcb != null && dtcb.Rows.Count > 0) { foreach (DataRow item in dtcb.Rows) { cardstr += " <div id='bank" + i.ToString() + "' > " + GetTran("001243", "开户行") + ": " + item["Bank"].ToString() + "<br/> " + GetTran("007506", "账") + " " + GetTran("007453", "号") + ": " + getsplit(item["BankBook"].ToString()) + "<br/> " + GetTran("000086", "开户名") + ": " + item["Bankname"].ToString() + "</div>"; i++; } this.cardlist.InnerHtml = cardstr;//绑定银行信息 } }
protected void Page_Load(object sender, EventArgs e) { Permissions.ThreeRedirect(Page, "../Member/" + Permissions.redirUrl); bzCurrency = CommonDataBLL.GetStandard(); //AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxMemShopCart)); if (Session["Store"] != null) { Literal1.Text = "<a href='../Store/First.aspx'>我的首页</a><a href='../Store/auditingmemberorders.aspx'>注册确认</a><a href='../Store/auditingmemberagain.aspx'>复消确认</a><a href='../Store/CheckOutOrders.aspx'>订单支付</a><a href='../Store/ViewAccountCircs.aspx'>充值浏览</a><a href='../Logout.aspx'>退出系统</a>"; } if (Session["Member"] != null) { Literal1.Text = "<a href='../Member/First.aspx'>我的首页</a><a href='../Member/AuditingMemberOrder.aspx'>报单支付</a><a href='../Member/ResultBrowse.aspx'>充值浏览</a><a href='../Logout.aspx'>退出系统</a>"; } if (!IsPostBack) { Translations(); lbltype.Text = GetTran("007286", "报单支付"); lblot.Text = GetTran("000079", "订单号"); if (Request.QueryString["blif"] != null && Request.QueryString["blif"] != "") { string blif = Request.QueryString["blif"].ToString(); string[] strs = EncryKey.GetDecrypt(blif); if (strs.Length >= 3) { ViewState["billid"] = strs[0]; ViewState["dotype"] = strs[1]; ViewState["roletype"] = strs[2]; if (ViewState["billid"] != null && ViewState["dotype"] != null && ViewState["roletype"] != null) { if (ViewState["dotype"].ToString() == "2") { loadpaytype(); LoadData1(); //数据加载 } else { if (ViewState["roletype"].ToString() == "2") { loadpaytype(); LoadData1(); //数据加载 } else { DataTable dt_one = DAL.DBHelper.ExecuteDataTable("select ordertype from memberorder where OrderID=" + strs[0]); string ordertype = dt_one.Rows[0]["ordertype"].ToString(); //订单类型 loadpaytype(); LoadData(ordertype); //数据加载 } } ViewState["loginnumber"] = loginnumber; //店铺离线支付 if (DocTypeTableDAL.Getpaytypeisusebyid(1, 1) || DocTypeTableDAL.Getpaytypeisusebyid(6, 5)) { Loadmk(); //生成标识 } } else { Response.Redirect("payerror.aspx"); } } else { Response.Redirect("payerror.aspx"); } } else { Response.Redirect("../default.aspx"); } } div_3.Visible = false;//暂时未有在线支付 }
protected void sub_Click(object sender, EventArgs e) { //设置特定值防止重复提交 hid_fangzhi.Value = "0"; string hkxz = " select value from JLparameter where jlcid=6"; DataTable dthkxz = DAL.DBHelper.ExecuteDataTable(hkxz); string value = dthkxz.Rows[0]["value"].ToString(); //验证店铺是否选择 //if (this.Number.Text.Trim().Length == 0) //{ // Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("002289", "请输入店铺!") + "')</script>"); // return; //} //验证金额是否输入正确 double d = 0; bool b = double.TryParse(this.buysz.Text.Trim(), out d); if (!b) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("001094", "金额输入不正确!") + "')</script>"); return; } if (d <= 0) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("001313", "申报的金额必须大于0!") + "')</script>"); return; } if (d > 9999999) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("006912", "输入金额太大!") + "')</script>"); return; } if (Convert.ToDecimal(d) % Convert.ToDecimal(value) != 0) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("009052", "汇款金额只能为") + value + GetTran("009053", "的倍数") + "!')</script>"); buysz.Text = ""; return; } string zw_dian; zw_dian = Session["Member"].ToString(); string Bank = ""; string BankName = ""; string BankBook = ""; string aa = " select top(1)* from companybank order by ID desc"; DataTable dt = DAL.DBHelper.ExecuteDataTable(aa); if (dt != null && dt.Rows.Count > 0) { Bank = dt.Rows[0]["Bank"].ToString(); BankName = dt.Rows[0]["BankName"].ToString(); BankBook = dt.Rows[0]["BankBook"].ToString(); } string rnumber = Session["member"].ToString(); RemittancesModel info = new RemittancesModel(); info.ReceivablesDate = DateTime.UtcNow; info.RemittancesDate = DateTime.UtcNow; info.IsJL = 1; info.ImportBank = Bank; info.ImportNumber = BankBook; info.name = BankName; info.RemittancesAccount = ""; info.RemittancesBank = ""; info.SenderID = ""; info.Sender = ""; info.RemitNumber = rnumber; info.RemitMoney = Convert.ToDecimal(Convert.ToDouble(this.buysz.Text)); info.StandardCurrency = bzCurrency; info.Use = 0; /*int.Parse(this.DeclarationType.SelectedValue)*/ info.PayexpectNum = BLL.CommonClass.CommonDataBLL.getMaxqishu(); info.Managers = zw_dian; info.ConfirmType = 0; info.Remark = ""; info.RemittancesCurrency = int.Parse(Session["Default_Currency"].ToString()); info.RemittancesMoney = Convert.ToDecimal(Convert.ToDouble(this.buysz.Text)); info.OperateIp = CommonDataBLL.OperateIP; info.OperateNum = Session["Member"].ToString(); //获取汇单号 string huidan = "HK" + Model.Other.MYDateTime.ToYYMMDDHHmmssString(); //判断汇单号是否存在:true存在,false不存在 bool isExist = RemittancesBLL.isMemberExistsHuiDan(huidan); while (isExist) { huidan = "HK" + Model.Other.MYDateTime.ToYYMMDDHHmmssString(); isExist = RemittancesBLL.isMemberExistsHuiDan(huidan); } info.RemitStatus = 1; info.IsGSQR = false; info.Remittancesid = huidan; RemittancesBLL.RemitDeclare(info, bzCurrency.ToString(), Session["Default_Currency"].ToString()); DataTable dt_one = DAL.DBHelper.ExecuteDataTable("select ID from remittances where RemittancesID='" + huidan + "'"); string HkID = dt_one.Rows[0]["ID"].ToString();//汇款ID int bishu = 4; string billid = EncryKey.GetEncryptstr(huidan, 2, 1); string url = "OnlinePayQD.aspx?HkID=" + HkID + "&bishu=" + bishu + "&RemitMoney=" + info.RemitMoney; Response.Redirect(url); //Page.ClientScript.RegisterStartupScript(GetType(), null, @"<script type='text/javascript'>var formobj=document.createElement('form');formobj.action='"+url+"';formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj);formobj.submit(); </script>"); this.buysz.Text = ""; }
protected void StartRecord_click(object sender, EventArgs e) { ConsigneeInfo cinfo = null; var member = Session["Member"]; if (member != null) { cinfo = MemberInfoModifyBll.getconsigneeInfo(member.ToString(), true); if (cinfo == null) { ScriptHelper.SetAlert(Page, "请先选择收货地址!", "PhoneSettings/SetConAddress.aspx?type=" + type + "&&url=AddLsOrder"); return; } } else { Response.Redirect("~/MemberMobile/Index.aspx"); return; } string count = DBHelper.ExecuteScalar("select count(*) from MemShopCart where memBh='" + luo.MemBh + "' and mType=" + Session["UserType"].ToString() + " and odType=" + luo.OrderType).ToString(); if (count == "0" && Session["UserType"].ToString() != "1") { ScriptHelper.SetAlert(Page, GetTran("007430", "您至少要选择一种产品") + "!", "ShopingList.aspx"); return; } else { IList <MemberDetailsModel> choseProList = new List <MemberDetailsModel>(); OrderDeal od = new OrderDeal(); OrderFinalModel ofm = new OrderFinalModel(); ofm.SendWay = 1;//收货途径 会员收货 if (Session["EditOrderID"] != null) { OrderFinalModel model = new OrderFinalModel(); ofm = od.GetDataModelFx(Convert.ToInt32(Session["UserType"]), luo.OrderType, out choseProList, ofm.SendWay); ofm.Assister = ""; } else { if (luo.OrderType == 21 || luo.OrderType == 11 || luo.OrderType == 31) { ofm = od.GetDataModel(Convert.ToInt32(Session["UserType"]), luo.OrderType, out choseProList, ofm.SendWay); if (new RegistermemberBLL().CheckNumberTwice(ofm.Number) != null) { ScriptHelper.SetAlert(Page, GetTran("007432", "会员编号已存在") + "!"); AgainTime.Value = "0"; DAL.DBHelper.ExecuteNonQuery("delete from MemShopCart where memBh='" + luo.MemBh + "' and mType=" + Session["UserType"].ToString()); return; } string placement = new RegistermemberBLL().GetHavePlacedOrDriect(ofm.Number, "", ofm.Placement, ofm.Direct); if (placement != null) { ScriptHelper.SetAlert(Page, placement); AgainTime.Value = "0"; DAL.DBHelper.ExecuteNonQuery("delete from MemShopCart where memBh='" + luo.MemBh + "' and mType=" + Session["UserType"].ToString()); return; } if (ofm.Placement != "8888888888") { if (DBHelper.ExecuteScalar("select count(0) from memberinfo where placement='" + ofm.Placement + "' and District=" + ofm.District + "").ToString() != "0") { ScriptHelper.SetAlert(Page, GetTran("007433", "安置人所选区位已有人安置") + "!"); AgainTime.Value = "0"; DAL.DBHelper.ExecuteNonQuery("delete from MemShopCart where memBh='" + luo.MemBh + "' and mType=" + Session["UserType"].ToString()); return; } } } else { ofm = od.GetDataModelFx(Convert.ToInt32(Session["UserType"]), luo.OrderType, out choseProList, ofm.SendWay); if (!MemberInfoDAL.IsMemberExist(ofm.Number)) { ScriptHelper.SetAlert(Page, GetTran("000725", "会员编号不存在") + "!"); AgainTime.Value = "0"; return; } ofm.Assister = ""; } if (luo.OrderType == 21 || luo.OrderType == 11) { if (Convert.ToDouble(ofm.TotalMoney) < SetParametersBLL.GetMemOrderLineOrderBaseLine()) { ScriptHelper.SetAlert(Page, GetTran("000000", "会员注册金额不能低于") + SetParametersBLL.GetMemOrderLineOrderBaseLine().ToString("f2") + "!"); AgainTime.Value = "0"; return; } } } ofm.StoreID = "8888888888"; ofm.Type = 2;// 运货方式 邮寄 //Convert.ToInt32(this.ddth.SelectedValue); //if (lblOdType.Text == GetTran("004008", "注册报单")) //{ // ofm.IsAgain = 0; //} //else //{ ofm.IsAgain = 1; //} ofm.OrderType = 12; double yfStr = 0; //地址 if (cinfo != null) { ofm.CCPCCode = cinfo.CPCCode; ofm.ConTelPhone = cinfo.MoblieTele; ofm.ConMobilPhone = cinfo.MoblieTele; ofm.ConPost = ""; ofm.Consignee = Encryption.Encryption.GetEncryptionName(cinfo.Consignee); ofm.ConZipCode = cinfo.ConZipCode; ofm.ConAddress = Encryption.Encryption.GetEncryptionAddress(cinfo.Address); } //ofm.ConCity.Country = this.CountryCity2.Country; //ofm.ConCity.Province = this.CountryCity2.Province; //ofm.ConCity.City = this.CountryCity2.City; //ofm.ConCity.Xian = this.CountryCity2.Xian; //ofm.ConAddress = Encryption.Encryption.GetEncryptionAddress(this.Txtdz.Text); //ofm.CCPCCode = DAL.CommonDataDAL.GetCPCCode(CountryCity2.Country, CountryCity2.Province, CountryCity2.City, CountryCity2.Xian); yfStr = 0; //ofm.ConTelPhone = txtOtherPhone.Text.Trim(); //ofm.ConMobilPhone = txtOtherPhone.Text.Trim(); //Txtyddh.Text.Trim(); //ofm.CarryMoney = Convert.ToDecimal(yfStr); //ofm.ConPost = ""; //ofm.Consignee = Encryption.Encryption.GetEncryptionName(txtConName.Text.Trim()); //ofm.ConZipCode = txtPostCode.Text; //ofm.Number = txtMemBh.Text; //产品总费用、年费、运费、应付总金额 double pdtMoney = 0; //double.Parse(this.ltPrice.Text); double CarriageMoney = 0; //运费 ofm.CarryMoney = decimal.Parse("0.00"); var dayPrice = CommonDataBLL.GetMaxDayPrice(); decimal yfje = Convert.ToDecimal(ofm.TotalMoney / Convert.ToDecimal(dayPrice)); ofm.TotalMoney = yfje + Convert.ToDecimal(CarriageMoney); //运费类型 //if (ddth.SelectedValue == "1")//自提 //{ // ofm.CarryMoney = decimal.Parse("0.00"); // this.txtYunfei.Text = ofm.CarryMoney.ToString(); //} //else //{ // this.txtYunfei.Text = ofm.CarryMoney.ToString(); // ofm.TotalMoney = Convert.ToDecimal(ofm.TotalMoney) + Convert.ToDecimal(CarriageMoney);//加运费 //} ofm.OrderExpect = CommonDataBLL.getMaxqishu(); ofm.StandardcurrencyMoney = yfje; ofm.TotalPv = 0; ofm.PaymentMoney = yfje; ofm.LevelInt = 1; ofm.StoreID = "8888888888"; ofm.InvestJB = yfje; //投资石斛积分币数量 ofm.PriceJB = Convert.ToDecimal(dayPrice); //石斛积分当前市价 ofm.OrderID = registermemberBLL.GetOrderInfo("add", null); if (Session["EditOrderID"] != null) { int zhifuZt = Convert.ToInt32(DBHelper.ExecuteScalar("select defraystate from memberorder where orderid='" + Session["EditOrderID"] + "'")); if (zhifuZt == 1) { ScriptHelper.SetAlert(Page, "该单已支付!不能修改!"); return; } SqlConnection conn = new SqlConnection(DBHelper.connString); conn.Open(); SqlTransaction tran = conn.BeginTransaction(); ofm.OrderID = Session["EditOrderID"].ToString(); new AddOrderDataDAL().Del_Horder(Session["EditOrderID"].ToString(), tran); Boolean flag = new DAL.AddOrderDataDAL().AddFinalOrderNoInfo(ofm, tran); if (flag) { //p_content.Visible = false; Session.Remove("mbreginfo"); Session.Remove("fxMemberModel"); Session.Remove("LUOrder"); Session.Remove("OrderType"); Session.Remove("EditOrderID"); Session.Remove("MemberUpgradeStore"); Session["MemberInfo_NP"] = ofm.Number + "," + ofm.Number; //储存会员的编号 tran.Commit(); conn.Close(); conn.Dispose(); DAL.DBHelper.ExecuteNonQuery("delete from MemShopCart where memBh='" + ofm.Number + "' and mType=" + Session["UserType"].ToString());//订单提交成功后,删除购物车 if (Session["UserType"].ToString() == "1") { int val = AddOrderDataDAL.OrderPayment(ofm.StoreID, ofm.OrderID, ofm.OperateIp, 1, 1, 1, "管理员", "", 4, -1, 1, 1, "", 0, ""); if (val == 0) { ClientScript.RegisterStartupScript(GetType(), "msg", "<script>alert('" + GetTran("000222", "修改成功") + "');location.href='../company/BrowseMemberOrders.aspx';</script>", false); } else { ClientScript.RegisterStartupScript(GetType(), "msg", "<script>alert('" + GetTran("007435", "修改成功自动支付失败") + "!');location.href='../company/BrowseMemberOrders.aspx';</script>", false); } } else if (Session["UserType"].ToString() == "2") { if (ofm.IsAgain == 0) { //ClientScript.RegisterStartupScript(GetType(), "msg", "<script>var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../store/browsememberorders.aspx';</script>", false); //ScriptManager.RegisterStartupScript(this, GetType(), "mag", "var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../store/browsememberorders.aspx';", true); } else { //ClientScript.RegisterStartupScript(GetType(), "msg", "<script>var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../store/viewfuxiao.aspx';</script>", false); //ScriptManager.RegisterStartupScript(this, GetType(), "mag", "var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../store/browsememberorders.aspx';", true); } } else { if (ofm.IsAgain == 0) { //ClientScript.RegisterStartupScript(GetType(), "msg", "<script>var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../member/browsememberorders.aspx';</script>", false); //ScriptManager.RegisterStartupScript(this, GetType(), "mag", "var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../member/browsememberorders.aspx';", true); } else { //ClientScript.RegisterStartupScript(GetType(), "msg", "<script>var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../member/memberorder.aspx';</script>", false); //ScriptManager.RegisterStartupScript(this, GetType(), "mag", "var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../member/browsememberorders.aspx';", true); Response.Redirect("../payserver/chosepaysjpay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + ""); } } } else { tran.Rollback(); conn.Close(); conn.Dispose(); ScriptHelper.SetAlert(Page, GetTran("000225", "修改失败")); } } else { Boolean flag = new DAL.AddOrderDataDAL().AddFinalOrder(ofm); if (flag) { //p_content.Visible = false; Session.Remove("mbreginfo"); Session.Remove("fxMemberModel"); Session.Remove("LUOrder"); Session.Remove("OrderType"); Session.Remove("EditOrderID"); Session.Remove("MemberUpgradeStore"); Session["MemberInfo_NP"] = ofm.Number + "," + ofm.Number; //储存会员的编号 DAL.DBHelper.ExecuteNonQuery("delete from MemShopCart where memBh='" + luo.MemBh + "' and mType=" + Session["UserType"].ToString()); //订单提交成功后,删除购物车 if (Session["UserType"].ToString() == "1") { int val = AddOrderDataDAL.OrderPayment(ofm.StoreID, ofm.OrderID, ofm.OperateIp, 1, 1, 1, "管理员", "", 5, -1, 1, 1, "", 0, ""); if (val == 0) { PublicClass.SendMsg(1, ofm.OrderID, ""); ClientScript.RegisterStartupScript(GetType(), "msg", "<script>alert('" + GetTran("000000", "购买成功") + "');location.href='../company/BrowseMemberOrders.aspx';</script>", false); } else { ClientScript.RegisterStartupScript(GetType(), "msg", "<script>alert('" + GetTran("000000", "报单成功,支付失败,店铺账户余额不足") + "!');location.href='../company/BrowseMemberOrders.aspx';</script>", false); } } else if (Session["UserType"].ToString() == "2") { if (ofm.IsAgain == 0) { //Response.Redirect("../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1), true); Response.Redirect("../payserver/chosepaysjpay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + ""); } else { Response.Redirect("../payserver/chosepaysjpay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + ""); //Response.Redirect("../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1), true); //ClientScript.RegisterStartupScript(GetType(), "msg", "<script>var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';</script>" , false);//+ // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../store/viewfuxiao.aspx';" } } else { if (ofm.IsAgain == 0) { Response.Redirect("../payserver/chosepaysjpay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + ""); //Response.Redirect("../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1), true); //ClientScript.RegisterStartupScript(GetType(), "msg", "<script>var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../membermobile/browsememberorders.aspx';</script>", false); } else { Response.Redirect("../payserver/chosepaysjpay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + ""); //Response.Redirect("../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1), true); //ClientScript.RegisterStartupScript(GetType(), "msg", "<script>var formobj=document.createElement('form');" // + "formobj.action='../payserver/chosepaysj.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID, 1, 1) + "';" + // "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='../membermobile/memberorder.aspx';</script>", false); } } } else { ScriptHelper.SetAlert(Page, GetTran("001557", "报单失败!")); } } } }
/// <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>"); }
/// <summary> /// 确定按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void go_Click(object sender, EventArgs e) { //验证店铺编号 if (TxtStore.Text == "" || TxtStore.Text == null) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("006026", "店铺编号不能为空!") + "');", true); return; } //获取用户选择商品的总钱和总积分 IList <MemberDetailsModel> choseProList = AddMemberDetails(); decimal SumMoney = Convert.ToDecimal(ViewState["TotalMoney"]); //Convert.ToDecimal(new RegistermemberBLL().getZongJing(choseProList)); decimal SumPv = Convert.ToDecimal(ViewState["TotalPv"]); //Convert.ToDecimal(new RegistermemberBLL().getZongPv(choseProList)); string orderID = MemberOrderAgainBLL.GetOrderInfo(IsEdit(), GetOrderId()); //获取报单号 MemberOrderModel momberorder = AddOrdrer(orderID, SumMoney, SumPv); //验证店铺是否存在 if (!MemberOrderAgainBLL.CheckStore(TxtStore.Text)) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("006027", "店铺编号不存在!") + "');", true); return; } //需要修改session取得期数,需要修改 if (!new RegistermemberBLL().IsMaxQiShu(CommonDataBLL.getMaxqishu())) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("001543", "只可对最大期数据进行操作") + "');", true); return; } //得到用户选择商品总金额和总积分 if (choseProList.Count == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("001550", "对不起,您还没有输入订货数量信息!") + "');", true); return; } if (Convert.ToBoolean(ViewState["StateCount"])) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("007039", "对不起,您选择了停售产品,并且超出了店铺库存数量!") + "');", true); return; } if (panel2.Visible) { //验证国家省份城市是否选择 if (CountryCity1.Country == "" || CountryCity1.Province == "" || CountryCity1.City == "")//|| CountryCity1.Country == "请选择" || CountryCity1.Province == "请选择" || CountryCity1.City == "请选择") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("001548", "对不起,请选择国家省份城市!") + "');", true); return; } } if (panel2.Visible) { //详细地址不能为空 if (Txtdz.Text == "") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("006933", "对不起,请填写详细地址!") + "');", true); return; } } double notEnoughmoney = new RegistermemberBLL().CheckMoneyIsEnough(choseProList, GetStoreId(), orderID); //不足货物的钱 momberorder.LackProductMoney = Convert.ToDecimal(MemberOrderAgainBLL.GetBzMoney(GetStoreId(), notEnoughmoney));//获得标准币种 //添加订单,跟新会员业绩,和该店库存报单的费用 if (MemberOrderAgainBLL.AddOrderData(IsEdit(), momberorder, choseProList)) { if (!IsEdit()) { double totalmoney = Convert.ToDouble(SumMoney); double totalcomm = 0; double zongMoney = totalmoney + totalcomm; ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "var formobj=document.createElement('form');" + "formobj.action='../payserver/chosepay.aspx?blif=" + EncryKey.GetEncryptstr(momberorder.OrderId, 1, 1) + "';" + "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();location.href='MemberOrder.aspx';", true); //购物车的session if (Session["proList"] != null) { Session.Remove("proList"); } } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("000222", "修改成功!") + "');location.href='membertrade.aspx';", true); } } else { if (!IsEdit()) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("001557", "报单失败!") + "');", true); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("000225", "修改失败!") + "');", true); } } }
protected void Page_Load(object sender, EventArgs e) { //获取标准币种 bzCurrency = CommonDataBLL.GetStandard(); huilv = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))); Permissions.ThreeRedirect(Page, "../Member/" + Permissions.redirUrl); //AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxMemShopCart)); if (!IsPostBack) { Translations(); lbltype.Text = GetTran("007286", "报单支付"); lblot.Text = GetTran("000079", "订单号"); if (Request.QueryString["blif"] != null && Request.QueryString["blif"] != "") { string blif = Request.QueryString["blif"].ToString(); string[] strs = EncryKey.GetDecrypt(blif); if (strs.Length >= 3) { ViewState["billid"] = strs[0]; ViewState["dotype"] = strs[1]; ViewState["roletype"] = strs[2]; if (ViewState["billid"] != null && ViewState["dotype"] != null && ViewState["roletype"] != null) { if (ViewState["dotype"].ToString() == "2") { loadpaytype(); LoadData1(); //数据加载 } else { if (ViewState["roletype"].ToString() == "2") { loadpaytype(); LoadData1(); //数据加载 } else { DataTable dt_one = DAL.DBHelper.ExecuteDataTable("select ordertype from memberorder where OrderID=" + strs[0]); string ordertype = dt_one.Rows[0]["ordertype"].ToString(); //订单类型 loadpaytype(); LoadData(ordertype); //数据加载 } } ViewState["loginnumber"] = loginnumber; //店铺离线支付 if (DocTypeTableDAL.Getpaytypeisusebyid(1, 1) || DocTypeTableDAL.Getpaytypeisusebyid(6, 5)) { Loadmk(); //生成标识 } } else { Response.Redirect("payerror1.aspx"); } } else { Response.Redirect("payerror1.aspx"); } } else { Response.Redirect("../default.aspx"); } } }
/// <summary> /// 控件翻译方法 /// </summary> //public void Translate() //{ // this.TranControls(this.dplCardType, new string[][] { // new string[] { "005898", "无" }, // new string[] { "005776", "身份证" }, // new string[] { "005775", "护照" }, // new string[] { "005774", "港澳台证" }, // }); //} /// <summary> /// 注册报单流程(包括判断) /// 调用逻辑层中的所有方法 /// </summary> public void AddOrderAndInfoProcess() { string number = CommonDataBLL.quanjiao(HFNumber.Value.Trim()); string direct = txtDirect.Text.Trim(); //会员名是否小于6位 if (!registermemberBLL.NumberLength(number)) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("000306", "抱歉!您输入的会员编号小于6位!") + "');</script>", false); return; } if (!registermemberBLL.NumberCheckAgain(number)) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("000309", "编号请输入字母,数字,横线!") + "');</script>", false); return; } string name = CommonDataBLL.quanjiao(txtName.Text.Trim()); if (name == "") { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("008360", "真实姓名不能为空") + "!" + "');</script>", false); return; } string tel = CommonDataBLL.quanjiao(txtTele.Text.Trim()); if (tel == "" || tel.Length != 11) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('手机号格式不正确!');</script>", false); return; } //string storeid = CommonDataBLL.quanjiao(txtStore.Text.Trim()); //if (storeid == "") //{ // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("008361", "所属店铺不能为空") + "!" + "');</script>", false); // return; //} //else //{ // if (!StoreInfoDAL.CheckStoreId(storeid)) // { // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("008362", "所属店铺编号不存在!") + "');</script>", false); // return; // } //} //判断用胡地址是否输入 if (this.CountryCity2.Country == "请选择" || this.CountryCity2.Province == "请选择" || this.CountryCity2.City == "请选择" || this.CountryCity2.Xian == "请选择" || this.CountryCity2.Country == "" || this.CountryCity2.Province == "" || this.CountryCity2.City == "" || this.CountryCity2.Xian == "") { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("001548", "对不起,请选择国家省份城市!") + "');</script>", false); return; } if (DAL.CommonDataDAL.GetCPCCode(this.CountryCity2.Country, this.CountryCity2.Province, this.CountryCity2.City, this.CountryCity2.Xian) == "") { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("001548", "对不起,请选择国家省份城市!") + "');</script>", false); return; } //string direct = CommonDataBLL.quanjiao(txtDirect.Text.Trim()); string placement = hidplacemnet.Value;// CommonDataBLL.quanjiao(SearchPlacement_DoubleLines1.Placement); //if (direct == "" || placement == "") //{ // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("000716", "推荐编号和安置编号不能为空!") + "');</script>", false); // return; //} //if (direct == number) //{ // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("006700", "推荐编号不能与会员编号相同") + "');</script>", false); // return; //} if (placement == number) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("001650", "安置编号不能与会员编号相同") + "');</script>", false); return; } //验证年龄是否大于18岁 //string birthDate = CommonDataBLL.quanjiao(txtBirthDate.Text.Trim()); //if (this.dplCardType.SelectedValue != "2") //{ // string alert = registermemberBLL.AgeIs18(birthDate); // if (alert != null) // { // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + alert + "');</script>", false); // return; // } //} ////检查会员生日 //if (this.dplCardType.SelectedValue != "2") //{ // if (registermemberBLL.CheckBirthDay(birthDate) == "error") // { // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("000148", "对不起,请选择正确的出生日期!") + "');</script>", false); // return; // } //} ////检测身份证需要新方法 //string CardResult = ""; //if (this.dplCardType.SelectedValue == "2") //{ // string papernumber = CommonDataBLL.quanjiao(this.txtPapernumber.Text.Trim()); // string result = BLL.Registration_declarations.CheckMemberInfo.CHK_IdentityCard(papernumber); // if (result.IndexOf(",") <= 0) // { // return; // } // else // { // CardResult = result; // } // DateTime birthday = Convert.ToDateTime(CardResult.Substring(0, CardResult.IndexOf(","))); // string alerta = registermemberBLL.AgeIs18(birthday.ToString()); // if (alerta != null) // { // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + alerta + "');</script>", false); // return; // } //} //ViewState["CardResult"] = CardResult; //验证会员编号是否重复 if (registermemberBLL.CheckNumberTwice(number) != null) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("000406", "抱歉!该会员编号重复!") + "');</script>", false); if (Request.QueryString["Much"] == null) { string bb = BLL.CommonClass.CommonDataBLL.GetMemberNumber(); this.txtNumber.Text = bb; this.HFNumber.Value = bb; this.txtNumber.ReadOnly = true; } return; } //验证手机号码是否重复 if (registermemberBLL.CheckTeleTwice(txtTele.Text.Trim()) != null) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('抱歉!该手机号码已被注册!');</script>", false); return; } MemberInfoModel mi = AddUserInfo(); if (mi.Placement != "8888888888") { if (DBHelper.ExecuteScalar("select count(0) from memberinfo where placement='" + mi.Placement + "' and District=" + mi.District + " and memberstate=1 ").ToString() != "0") { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("007433", "安置人所选区位已有人安置!") + "');</script>", false); return; } } //注册会员检错1.无上级 2.无此店 3..死循环 string CheckMember = registermemberBLL.CheckMemberInProc(mi.Number, mi.Placement, mi.Direct, mi.StoreID); CheckMember = new GroupRegisterBLL().GerCheckErrorInfo(CheckMember); ViewState["Error"] = CheckMember; if (Request.QueryString["Much"] == null) { if (CheckMember != null) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + CheckMember + "');</script>", false); return; } string placement_check = registermemberBLL.GetHavePlacedOrDriect(mi.Number, "", mi.Placement, mi.Direct); if (placement_check != null) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + placement_check + "');</script>", false); return; } //判断该编号是否有安置,推荐 string GetError = registermemberBLL.GetError(mi.Direct, mi.Placement); if (GetError != null) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetError + "');</script>", false); return; } string GetError1 = new AjaxClass().CheckNumberNetAn(direct, placement); if (GetError1 != null && GetError1 != "") { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("005986", "安置编号必须在推荐编号的安置网络下面!") + "');</script>", false); return; } string GetError2 = new AjaxClass().CheckNumberNetAn(Session["Member"].ToString(), direct); if (GetError2 != null && GetError2 != "") { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("000000", "推荐编号必须在自己的安置网络下面!") + "');</script>", false); return; } #region 安置推荐人必须要激活 if (Convert.ToInt32(DAL.DBHelper.ExecuteScalar("select COUNT(0) from MemberInfo where MemberState=0 and Number='" + CommonDataBLL.quanjiao(Session["Member"].ToString()) + "'")) != 0) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("000000", "推荐编号未激活!") + "');</script>", false); return; } if (Convert.ToInt32(DAL.DBHelper.ExecuteScalar("select COUNT(0) from MemberInfo where MemberState=2 and Number='" + CommonDataBLL.quanjiao(Session["Member"].ToString()) + "'")) != 0) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("009090", "推荐编号已注销!") + "');</script>", false); return; } if (Convert.ToInt32(DAL.DBHelper.ExecuteScalar("select COUNT(0) from MemberInfo where MemberState=0 and Number='" + CommonDataBLL.quanjiao(hidplacemnet.Value) + "'")) != 0) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("000000", "安置编号未激活!") + "');</script>", false); return; } if (Convert.ToInt32(DAL.DBHelper.ExecuteScalar("select COUNT(0) from MemberInfo where MemberState=2 and Number='" + CommonDataBLL.quanjiao(hidplacemnet.Value) + "'")) != 0) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("009107", "安置编号已注销!") + "');</script>", false); return; } #endregion //int placementXuHao = registermemberBLL.GetXuHao(mi.Direct); //if (placementXuHao >= 0) //{ // string GetError1 = new AjaxClass().CheckNumberNetAn(txtDirect.Text.Trim(), SearchPlacement_DoubleLines1.Placement); // if (GetError1 != null && GetError1 != "") // { // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("005986", "安置编号必须在推荐编号的安置网络下面!") + "');</script>", false); // return; // } //} //如果是零购注册,判断推荐人和安置人的注册期数是否合格 //if (Session["Company"] != null) //{ // int tjExpectNum = registermemberBLL.GetError2(this.Txttj.Text.Trim()); // if (tjExpectNum > Convert.ToInt32(this.ddlQishu.SelectedValue)) // { // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("006013", "推荐人的注册期数必须大于") + this.ddlQishu.SelectedValue + "!');</script>", false); // return; // } // int anExpectNum = registermemberBLL.GetError2(SearchPlacement_DoubleLines1.Placement.Trim()); // if (anExpectNum > Convert.ToInt32(this.ddlQishu.SelectedValue)) // { // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + this.GetTran("006014", "安置人的注册期数必须大于") + this.ddlQishu.SelectedValue + "!');</script>", false); // return; // } //} } mi.PhotoPath = ""; if (Session["UserType"] != null && Session["UserType"].ToString() == "1") //公司注册 { mi.OrderType = 31; Session["LUOrder"] = mi.Number + ",31,1"; } else if (Session["UserType"] != null && Session["UserType"].ToString() == "2") //店铺注册 { mi.OrderType = 11; Session["LUOrder"] = mi.Number + ",11,2"; } else if (Session["UserType"] != null && Session["UserType"].ToString() == "3") //会员注册 { mi.OrderType = 21; Session["LUOrder"] = mi.Number + ",21,3"; mi.Assister = Session["Member"].ToString(); } else //默认店铺注册 { mi.OrderType = 11; Session["LUOrder"] = mi.Number + ",11,2"; } Session["mbreginfo"] = mi; if (Session["mbreginfo"] != null) { decimal totalmoeny = 0.00M; decimal bili = 0.00M; DataTable dts = DAL.DBHelper.ExecuteDataTable("select top 1 * from config order by createdate desc"); if (dts.Rows != null && dts.Rows.Count > 0) { decimal htm = Convert.ToDecimal(hidtzmoney.Value); if (htm == Convert.ToDecimal(dts.Rows[0]["para1"])) { bili = Convert.ToDecimal(dts.Rows[0]["para4"]); } if (htm == Convert.ToDecimal(dts.Rows[0]["para2"])) { bili = Convert.ToDecimal(dts.Rows[0]["para5"]); } if (htm == Convert.ToDecimal(dts.Rows[0]["para3"])) { bili = Convert.ToDecimal(dts.Rows[0]["para6"]); } } OrderFinalModel ofm = new OrderFinalModel(); var dayPrice = CommonDataBLL.GetMaxDayPrice(); totalmoeny = Convert.ToDecimal(hidtzmoney.Value);; //投资金额 var value = Convert.ToDecimal(totalmoeny) / Convert.ToDecimal(dayPrice); //投资金额换化石斛积分 var expect = CommonDataBLL.getMaxqishu(); ofm.InvestJB = Convert.ToDecimal(value * bili); //投资石斛积分数量 ofm.PriceJB = Convert.ToDecimal(dayPrice); //石斛积分当前市价 ofm.SendWay = 1; ofm.Number = mi.Number; ofm.Placement = mi.Placement; ofm.Direct = mi.Direct; ofm.ExpectNum = expect; ofm.OrderID = registermemberBLL.GetOrderInfo("add", null); ofm.StoreID = mi.StoreID; ofm.Name = mi.Name; ofm.PetName = mi.PetName; ofm.LoginPass = mi.LoginPass; ofm.AdvPass = mi.AdvPass; ofm.LevelInt = mi.LevelInt; ofm.RegisterDate = mi.RegisterDate; ofm.Birthday = mi.Birthday; ofm.Sex = mi.Sex; ofm.HomeTele = mi.HomeTele; ofm.OfficeTele = mi.OfficeTele; ofm.MobileTele = mi.MobileTele; ofm.FaxTele = mi.FaxTele; ofm.CPCCode = mi.CPCCode; ofm.Address = mi.Address; ofm.PostalCode = mi.PostalCode; ofm.PaperType.PaperTypeCode = mi.PaperType.PaperTypeCode; ofm.PaperNumber = mi.PaperNumber; ofm.BankCode = mi.BankCode; ofm.BankAddress = mi.BankAddress; ofm.BankCard = mi.BankCard; ofm.BCPCCode = mi.BCPCCode; ofm.BankBook = mi.BankBook; ofm.Remark = mi.Remark; ofm.ChangeInfo = mi.ChangeInfo; ofm.PhotoPath = mi.PhotoPath; ofm.Email = mi.Email; ofm.IsBatch = mi.IsBatch; ofm.Language = mi.Language; ofm.OperateIp = mi.OperateIp; ofm.OperaterNum = mi.OperaterNum; ofm.Answer = mi.Answer; ofm.Question = mi.Question; ofm.Error = mi.Error; ofm.Bankbranchname = mi.Bankbranchname; ofm.Flag = mi.Flag; ofm.Assister = mi.Assister; ofm.District = mi.District; ofm.Type = Convert.ToInt32(rbltotaltype.SelectedValue); ofm.TotalMoney = Convert.ToDecimal(totalmoeny); ofm.TotalPv = Convert.ToDecimal(value);//投资金额兑换成石斛 ofm.OrderType = mi.OrderType; ofm.OrderExpect = expect; ofm.StandardcurrencyMoney = ofm.TotalMoney; ofm.PaymentMoney = ofm.TotalMoney; ofm.OrderDate = DateTime.UtcNow; ofm.RemittancesId = ""; ofm.ElectronicaccountId = ""; ofm.ConCity.Country = ""; ofm.ConCity.Province = ""; ofm.ConCity.City = ""; ofm.ConCity.Xian = ""; ofm.ConAddress = mi.Address; ofm.CCPCCode = mi.CPCCode; ofm.ConTelPhone = mi.MobileTele; ofm.ConMobilPhone = mi.MobileTele; ofm.CarryMoney = 0; ofm.ConPost = mi.Email; ofm.Consignee = mi.PetName; ofm.ConZipCode = mi.PostalCode; ofm.ProductIDList = ""; ofm.QuantityList = ""; ofm.NotEnoughProductList = ""; ofm.PhotoPath = ""; Boolean flag = new AddOrderDataDAL().AddFinalOrder(ofm); if (flag) { // ClientScript.RegisterStartupScript(this.GetType(), "", "<script>$('#tiaoz').show();document.getElementById('tiaoz').href = '../payserver/chosepaysjpay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID.ToString(), 1, 1) + "'; alertt('注册订单已生成,请及时支付!');</script>", false); ClientScript.RegisterStartupScript(this.GetType(), "", "<script>location.href = '../payserver/chosepaysjpay.aspx?blif=" + EncryKey.GetEncryptstr(ofm.OrderID.ToString(), 1, 1) + "'; </script>", false); } } else { Response.Redirect("registermember.aspx"); } }