/// <summary> /// 执行添加操作员 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnadd_Click(object sender, EventArgs e) { if (!Getvalidate()) { return; } if (getishave(this.txtusername.Text.Trim())) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("007915", "操作员登录名重复") + "!')</script>"); return; } string pass = Encryption.Encryption.GetEncryptionPwd(this.txtpass.Text.Trim(), this.txtusername.Text.Trim()); //加密密码 int res = RemittancesDAL.doOrgman(this.txtusername.Text, pass, "", 1); if (res == 0) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("000891", "添加成功!") + "')</script>"); } else { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("000007", "添加失败") + "!')</script>"); } backdata(); Binddatalist(); return; }
public int Getupdatesound(string rmide) { NumberByBit nbt = new NumberByBit(); string rmid = nbt.DecryptDES(rmide, "20120518"); return(RemittancesDAL.Getupdatesound(rmid)); }
protected void gvdormitlist_RowCommand(object sender, GridViewCommandEventArgs e) { // ControlRemitService mrl = new ControlRemitService(); //创建webservice对象 string remstr = e.CommandArgument.ToString(); int res = 0; string f = "到账审核失败,请重新操作!"; string s = "到账审核成功!"; if (e.CommandName == "spa") { res = RemittancesDAL.PaymentChongzhi(remstr, 2); } if (e.CommandName == "sup") { res = RemittancesDAL.PaymentChongzhi(remstr, 4); } //未到账 if (e.CommandName == "nop") { res = res = RemittancesDAL.PaymentChongzhi(remstr, 7); f = "迟到账审核失败,请重新操作!"; s = "迟到账审核成功,该会员已没有自助确认到账功能!"; } if (e.CommandName == "nou") { string number = e.CommandArgument.ToString(); res = RemittancesDAL.Doisuseconfirm(number); f = "设置未到账失败,请重新设置!"; s = "设置未到账成功!"; } //if (e.CommandName == "cls") //{ // string rmid = e.CommandArgument.ToString(); // rmid= nbb.EncryptDES(rmid, pk); // res= mrl.Getupdatesound(rmid); // f = "无操作!"; // s = "提示已关闭!"; //} if (res == 0) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + f + "' ); </script>"); } else { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + s + "'); </script>"); DataBindgvlist(); } }
protected void Page_Load(object sender, EventArgs e) { //获取标准币种 bzCurrency = CommonDataBLL.GetStandard(); huilv = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))); if (!this.IsPostBack) { var HkID = Request.QueryString["HkID"]; var bishu = Request.QueryString["bishu"]; var RemitMoney = (Convert.ToDouble(Request.QueryString["RemitMoney"]) * huilv).ToString("f2"); int bishu1 = int.Parse(bishu); rmoney.Text = RemitMoney; rmoney1.Value = RemitMoney; hkid.Value = HkID; DataTable dt = null;// RemittancesBLL.jinliucx(HkID); bishucount.Text = (dt.Rows.Count).ToString(); string sm = "select describe from JLparameter where jlcid=8"; DataTable sm2 = DAL.DBHelper.ExecuteDataTable(sm); var shuomin = sm2.Rows[0]["describe"].ToString(); Label2.Text = shuomin; if (bishucount.Text == "0") { bishucount.Text = "1"; string dt_one1 = "update Remittances set Ispipei=1 where ID=" + HkID; DataTable dt3 = DAL.DBHelper.ExecuteDataTable(dt_one1); DataTable dt_one3 = DAL.DBHelper.ExecuteDataTable("select * from remittances where ID=" + HkID); string RemittancesID = dt_one3.Rows[0]["RemittancesID"].ToString(); //汇款单号 string RemBankBook = dt_one3.Rows[0]["ImportNumber"].ToString(); //汇款单号 string RemBankname = dt_one3.Rows[0]["name"].ToString(); //汇款单号 string RemBankaddress = dt_one3.Rows[0]["ImportBank"].ToString(); //汇款单号 RemittancesDAL.WithdrawMoney(Session["Member"].ToString(), Convert.ToDouble(RemitMoney) / huilv, RemittancesID, RemBankBook, RemBankname, RemBankaddress); string dt_one = "select top(1) * from companybank order by ID desc"; DataTable dt2 = DAL.DBHelper.ExecuteDataTable(dt_one); rep_km.Visible = false; rep_km1.Visible = true; rep_km1.DataSource = dt2; rep_km1.DataBind(); } else { rep_km1.Visible = false; rep_km.Visible = true; rep_km.DataSource = dt; rep_km.DataBind(); } Translations(); } }
/// protected void gvcontrolors_RowCommand(object sender, GridViewCommandEventArgs e) { string uid = e.CommandArgument.ToString(); int res = 0; if (e.CommandName == "mdf") { //Permissions.CheckManagePermission(Model.Other.EnumCompanyPermission.ManagModify_Modify); int id = Convert.ToInt32(uid); loaddate(id); } if (e.CommandName == "use") { //Permissions.CheckManagePermission(Model.Other.EnumCompanyPermission.ManagModify_Stop); res = RemittancesDAL.doOrgman(uid, "", "", 4); if (res == 0) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("001401", "操作成功!") + "')</script>"); Binddatalist(); return; } else { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("001541", "操作失败!") + "')</script>"); return; } } if (e.CommandName == "del") { //Permissions.CheckManagePermission(Model.Other.EnumCompanyPermission.ManagModify_Del); res = RemittancesDAL.doOrgman(uid, "", "", 3); if (res == 0) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("000749", "删除成功!") + "')</script>"); } else { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("000417", "删除失败!") + "')</script>"); } backdata(); Binddatalist(); translation(); return; } }
public bool VilidateLogin(string username, string ukp) { int res = 1; NumberByBit nbt = new NumberByBit(); string desstnpi = nbt.DecryptDES(ukp, "20120518"); string[] srmps = desstnpi.Split(','); if (srmps.Length == 3) { string uname = srmps[0]; if (uname == username) { string pass = Encryption.Encryption.GetEncryptionPwd(srmps[1], username); //加密密码 string ip = srmps[2]; res = RemittancesDAL.doOrgman(uname, pass, ip, 2); //验证登录 } } return(res == 0); }
/// <summary> /// 通用的统计金额——ds2012——tianfeng /// </summary> /// <param name="clounms"></param> /// <param name="table"></param> /// <param name="sqlwhere"></param> /// <returns></returns> public static string GetTotalMoney(string clounms, string table, string sqlwhere) { return(RemittancesDAL.GetTotalMoney(clounms, table, sqlwhere).ToString("f2")); }
/// <summary> /// 查询会员汇款总计——ds2012——tianfeng /// </summary> /// <returns></returns> public static string GetTotalMemberRemittances() { return(RemittancesDAL.GetTotalMemberRemittances().ToString("f2")); }
/// <summary> /// 根据付款用途统计金额(店铺汇款)——ds2012——tianfeng /// </summary> /// <param name="use"></param> /// <returns></returns> public static string GetUseToatal(int use) { return(RemittancesDAL.GetUseTotal(use).ToString("f2")); }
/// <summary> /// 汇款合计总额 /// </summary> /// <param name="summoney">总金额</param> /// <param name="currencyname">货币类型名称</param> public static void TotalMoney(out double summoney, out string currencyname) { RemittancesDAL.TotalMoney(out summoney, out currencyname); }
/// <summary> /// 获得会员汇款相应币种的总金额 /// </summary> /// <param name="isqueren"></param> /// <param name="begin"></param> /// <param name="end"></param> /// <returns></returns> public static DataTable GetTotalMoneyorCurrency(string isqueren, DateTime begin, DateTime end, string number) { return(RemittancesDAL.GetTotalMoneyorCurrency(isqueren, begin, end, number)); }
/// <summary> /// 根据会员编号获取店铺编号 /// </summary> /// <param name="number"></param> /// <returns></returns> public static string GetStoreIDByNumber(string number) { return(RemittancesDAL.GetStoreIDByNumber(number)); }
/// <summary> /// 店铺汇款单是否存在——ds2012——tianfeng /// </summary> /// <param name="id">汇款单编号</param> /// <returns></returns> public static bool IsExist(int id) { return(RemittancesDAL.IsExist(id)); }
/// <summary> /// 店铺是否存在 /// </summary> /// <param name="id">店铺编号</param> /// <returns></returns> public static bool IsMemberExist(string number) { return(RemittancesDAL.IsMemberExist(number)); }
/// <summary> /// 店铺是否存在 /// </summary> /// <param name="id">店铺编号</param> /// <param name="Name">店长姓名</param> /// <returns></returns> public static bool IsStoreExist(string number, string Name) { return(RemittancesDAL.IsStoreExist(number, Name)); }
///// <summary> ///// 会员奖金转店铺 ///// </summary> ///// <param name="info"></param> ///// <param name="RateName1"></param> ///// <param name="RateName2"></param> //public static void EFT(RemittancesModel info, string RateName1, string RateName2) //{ // RemittancesDAL.EFT(info, RateName1, RateName2); //} public static bool EFT(RemittancesModel info, string RateName1, string RateName2, string storeID, SqlTransaction tran) { return(RemittancesDAL.EFT(info, RateName1, RateName2, storeID, tran)); }
/// <summary> /// 奖金转店铺 /// </summary> /// <param name="info"></param> /// <param name="RateName1"></param> /// <param name="RateName2"></param> public static void EFT(RemittancesModel info, string RateName1, string RateName2) { RemittancesDAL.EFT(info, RateName1, RateName2); }
/// <summary> /// 预收账款分页 /// </summary> /// <param name="pagin">分页帮助类</param> /// <param name="key">键</param> /// <param name="condition">条件</param> /// <returns></returns> public static IList <RemittancesModel> ReceiveOrderList(PaginationModel pagin, string tableName, string key, string condition) { string cloumns = " Remittances.StoreID, Remittances.Sender,Remittances.Managers,Remittances.ImportBank, Remittances.PayWay,Remittances.RemittancesNumber,Remittances.[Use],Remittances.StandardCurrency,Remittances.ConfirmType, Remittances.SenderID, Remittances.RemitMoney,Remittances.PayExpectNum,Remittances.Id,Remittances.ReceivablesDate,Remittances.PayExpectNum,Remittances.isgsqr,Remittances.Remark "; return(RemittancesDAL.ReceiveOrderList(pagin, tableName, key, cloumns, condition)); }
/// <summary> /// 更新店铺汇款额,预收账款——ds2012——tianfeng /// </summary> ///<param name="type">汇款ID</param> /// <param name="money">汇款金额</param> /// <param name="storeID">汇款店铺</param> /// <param name="storeID">操作者IP</param> /// <param name="storeID">操作者编号</param> public static void Auditing(int id, double money, string storeID, string OperateIP, string OperateNum) { RemittancesDAL.Auditing(id, money, storeID, OperateIP, OperateNum); }
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;//绑定银行信息 } }
/// <summary> /// 更新会员汇款额,预收账款——ds2012——tianfeng /// </summary> ///<param name="type">汇款ID</param> /// <param name="money">汇款金额</param> /// <param name="storeID">汇款会员</param> /// <param name="storeID">操作者IP</param> /// <param name="storeID">操作者编号</param> public static void MemberAuditing(int id, double money, string number, string OperateIP, string OperateNum) { RemittancesDAL.MemberAuditing(id, money, number, OperateIP, OperateNum); }
/// <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; }
/// <summary> /// 会员汇款单是否存在——ds2012——tianfeng /// </summary> /// <param name="id">汇款单编号</param> /// <returns></returns> public static bool MemberIsExist(int id) { return(RemittancesDAL.MemberIsExist(id)); }
public static string GetCurrencyByID(int type) { return(RemittancesDAL.GetCurrencyByID(type)); }
/// <summary> /// 根据汇单id获取信息 /// </summary> /// <param name="huidan"></param> /// <returns></returns> public static RemittancesModel GetMemberRemittances(string huidan) { return(RemittancesDAL.GetMemberRemittances(huidan)); }
/// <summary> /// 判断会员汇单号是否存在 /// </summary> /// <param name="huidan">汇单号</param> /// <returns></returns> public static bool MemberisExistsHuiDan(string huidan) { return(RemittancesDAL.MemberisExistsHuiDan(huidan)); }
/// <summary> /// 获取标示码 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Loadmk() { string billid = ViewState["billid"].ToString(); int dotype = Convert.ToInt32(ViewState["dotype"]); int roletype = Convert.ToInt32(ViewState["roletype"]); double currency = AjaxClass.GetCurrency(int.Parse(Session["Default_Currency"] == null ? bzCurrency.ToString() : Session["Default_Currency"].ToString())); string ip = Request.UserHostAddress.ToString(); string remark = ""; MemberOrderModel memberorder = null; DataTable ordergoodstable = null; DataTable ordergoodstable1 = null; double ordertmoney = 0; if (roletype == 1) //会员订单 { if (dotype == 1) { memberorder = MemberOrderDAL.GetMemberOrder(billid); ordertmoney = Convert.ToDouble(memberorder.TotalMoney); } } else if (roletype == 2) //店铺 { if (dotype == 1) { ordergoodstable = OrderDetailDAL.Getordergoodstablebyorderid1(billid); ordergoodstable1 = OrderDetailDAL.Getordergoodstablebyorderid2(billid); if (ordergoodstable != null && ordergoodstable.Rows.Count > 0) { ordertmoney = Convert.ToDouble(ordergoodstable.Rows[0]["totalmoney"]); } else { if (ordergoodstable1 != null && ordergoodstable1.Rows.Count > 0) { ordertmoney = Convert.ToDouble(ordergoodstable1.Rows[0]["totalmoney"]); } } } } string biaoshi = ""; if (dotype == 1) //订单支付生成尾数 { remark = loginnumber + "汇款支付订单" + billid; int c = 1; //数据库中1代表会员 0代表店铺 if (roletype == 2) { c = 0; } string rmid = RemittancesDAL.GetAddnewRemattice(loginnumber, ordertmoney, ip, billid, remark, c); ViewState["remid"] = rmid; DataTable dt = DBHelper.ExecuteDataTable("select totalrmbmoney ,totalmoney from remtemp where remittancesid='" + rmid + "'"); if (dt != null && dt.Rows.Count > 0) { // biaoshi = Convert.ToDouble(dt.Rows[0]["totalrmbmoney"]).ToString("f2"); biaoshi = Convert.ToDouble(dt.Rows[0]["totalmoney"]).ToString("#0.00"); } } else if (dotype == 2) //汇款充值生成尾数 { RemittancesDAL.GetAddnewRetmp(loginnumber, billid, ip, remark, roletype); DataTable dt = DBHelper.ExecuteDataTable("select totalrmbmoney ,totalmoney from remtemp where remittancesid='" + billid + "'"); //查找出标识 if (dt != null && dt.Rows.Count > 0) { //biaoshi = Convert.ToDouble(dt.Rows[0]["totalrmbmoney"]).ToString("f2"); biaoshi = Convert.ToDouble(dt.Rows[0]["totalmoney"]).ToString("#0.00"); } } if (biaoshi != "" && biaoshi.ToString().IndexOf('.') > 0) { DataTable dt = new DataTable(); if (dotype == 1) { remark = loginnumber + "汇款支付订单" + billid; int c = 1; //数据库中1代表会员 0代表店铺 if (roletype == 2) { c = 0; } string rmid = RemittancesDAL.GetAddnewRemattice(loginnumber, ordertmoney, ip, billid, remark, c); ViewState["remid"] = rmid; dt = DBHelper.ExecuteDataTable("select totalrmbmoney ,totalmoney from remtemp where remittancesid='" + rmid + "'"); } else if (dotype == 2) { RemittancesDAL.GetAddnewRetmp(loginnumber, billid, ip, remark, roletype); dt = DBHelper.ExecuteDataTable("select totalrmbmoney ,totalmoney from remtemp where remittancesid='" + billid + "'"); //查找出标识 } string bb = (double.Parse(biaoshi) * currency).ToString(); //lblpartmoney.Text = (bb).Substring(0, (bb).IndexOf('.')); //string chart = bb.Substring(bb.IndexOf('.') + 1); this.lblmoneyre.Text = (double.Parse(bb)).ToString(); this.lblrmb.Text = double.Parse(lbltotalmoney.Text).ToString("#0.00"); //lblchat.Text = (double.Parse(chart) ).ToString(); ; //lbljiao.Text = chart.Substring(0, 1); //lblfen.Text = chart.Substring(1); } }
/// <summary> /// 查询店铺信息——ds2012——tianfeng /// </summary> /// <param name="table"></param> /// <param name="condition"></param> /// <returns></returns> public static DataTable Quertystore(string table, string condition) { return(RemittancesDAL.QueryStore(table, condition)); }
/// <summary> /// Get statistics money information by storeID——ds2012——tianfeng /// </summary> /// <param name="storeID">storeID</param> /// <returns>return Datatable object</returns> public static DataTable GetStatisticsMoneyInfoByStoreID(string storeID, int payExpectNum) { return(RemittancesDAL.GetStatisticsMoneyInfoByStoreID(storeID, payExpectNum)); }
/// <summary> /// 根据银行编码查询银行名称——ds2012——tianfeng /// </summary> /// <param name="bankcode"></param> /// <returns></returns> public static string GetBankName(string bankcode) { return(RemittancesDAL.QueryBankName(bankcode)); }