/// <summary> /// 转账 /// </summary> void PayOther() { string userTo = Utils.GetQueryStringValue("a"); decimal moneys = Utils.GetDecimal(Utils.GetQueryStringValue("m")); int result = new Eyousoft_yhq.BLL.Member().UpdatePayState(userInfo.UserID, userTo, moneys); if (result == -102) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "转账金额不能为0!")); } if (result == -101) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "转账账户错误")); } if (result == -100) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "登陆失败,请重新登陆!")); } if (result == -99) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "可用余额不足!")); } if (result == -98) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "不能给本人转账")); } if (result == 0) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "转帐失败")); } if (result == 1) { Eyousoft_yhq.BLL.BConDetaile ser = new Eyousoft_yhq.BLL.BConDetaile(); Eyousoft_yhq.Model.MConDetaile model = new MConDetaile(); model.HuiYuanID = userInfo.UserID; model.XFway = (Model.XFfangshi)XFfangshi.转帐; Random rn = new Random(); model.DingDanBianHao = DateTime.Now.ToString("yyyyMMddHHmm") + rn.Next(10000, 99999).ToString(); model.JiaoYiHao = DateTime.Now.ToString("yyyyMMddHHmm") + rn.Next(10000, 99999).ToString(); model.JiaoYiShiJian = DateTime.Now; string Mobile = Utils.GetQueryStringValue("userTo"); var modelUser = new Eyousoft_yhq.BLL.Member().GetModelByName(Mobile); model.JiaoYiDuiXiang = modelUser.UserID; model.JinE = moneys; new Eyousoft_yhq.BLL.BConDetaile().Add(model); } Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "转帐成功")); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(MConDetaile model) { StringBuilder strSql = new StringBuilder(); strSql.Append("INSERT INTO tbl_ConDetailed( HuiYuanID, JiaoYiHao ,JinE ,JiaoYiShiJian, XiaoFeiFangShi ,DingDanBianHao ,JiaoYiDuiXiang, DingDanLeiBie) VALUES ( @HuiYuanID, @JiaoYiHao,@JinE,@JiaoYiShiJian, @XiaoFeiFangShi,@DingDanBianHao,@JiaoYiDuiXiang,@DingDanLeiBie)"); DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString()); this._db.AddInParameter(cmd, "HuiYuanID", DbType.AnsiStringFixedLength, model.HuiYuanID); this._db.AddInParameter(cmd, "JiaoYiHao", DbType.String, model.JiaoYiHao); this._db.AddInParameter(cmd, "JinE", DbType.Decimal, model.JinE); this._db.AddInParameter(cmd, "JiaoYiShiJian", DbType.DateTime, model.JiaoYiShiJian); this._db.AddInParameter(cmd, "XiaoFeiFangShi", DbType.Byte, model.XFway); this._db.AddInParameter(cmd, "DingDanBianHao", DbType.String, model.DingDanBianHao); this._db.AddInParameter(cmd, "JiaoYiDuiXiang", DbType.String, model.JiaoYiDuiXiang); this._db.AddInParameter(cmd, "DingDanLeiBie", DbType.Byte, model.DDCarrtes); return(DbHelper.ExecuteSql(cmd, this._db)); }
/// <summary> /// 支付订单 /// </summary> void Save() { var order = new Eyousoft_yhq.BLL.Order().GetModel(Utils.GetQueryStringValue("id")); if (order == null) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "数据丢失,请刷新页面")); } order.PayState = Eyousoft_yhq.Model.PaymentState.已支付; int i = new Eyousoft_yhq.BLL.Order().XiaoFei(order, HuiYuanInfo.UserID); if (i == 1) { Eyousoft_yhq.Model.MConDetaile model = new MConDetaile(); model.HuiYuanID = HuiYuanInfo.UserID; model.XFway = (Model.XFfangshi)XFfangshi.消费; Random rn = new Random(); model.DingDanBianHao = order.OrderCode; model.JiaoYiHao = DateTime.Now.ToString("yyyyMMddHHmm") + rn.Next(10000, 99999).ToString(); model.JiaoYiShiJian = DateTime.Now; model.DDCarrtes = DDleibie.旅游订单; model.JinE = order.OrderPrice; new Eyousoft_yhq.BLL.BConDetaile().Add(model); } if (i == -99) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "已支付")); } if (i == -98) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "余额不足")); } if (i == 0) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "支付失败")); } if (i == 1) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "支付成功")); } }
/// <summary> /// 支付 /// </summary> void setZF() { decimal money = Utils.GetDecimal(Utils.GetQueryStringValue("op")); string orderid = Utils.GetQueryStringValue("id"); var order = new Eyousoft_yhq.BLL.BJiPiaoBaoCun().GetModel(orderid); if (order == null) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "数据丢失,请重新操作")); } int result = new Eyousoft_yhq.BLL.BJiPiaoBaoCun().ZhiFu(new MJiPiaoBaoCun() { OpeatorID = userInfo.UserID, OrderID = orderid, payState = TickOrderPayState.已支付, OrderPrice = money }); if (result == -99) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "账户余额不足,请联系4008005216进行充值!")); } if (result == -98) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "已支付!")); } if (result == 0) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "支付失败!")); } if (result == 1) { Eyousoft_yhq.BLL.BConDetaile ser = new Eyousoft_yhq.BLL.BConDetaile(); Eyousoft_yhq.Model.MConDetaile model = new MConDetaile(); model.HuiYuanID = userInfo.UserID; model.XFway = (Model.XFfangshi)XFfangshi.消费; Random rn = new Random(); model.DingDanBianHao = order.OrderCode; model.JiaoYiHao = DateTime.Now.ToString("yyyyMMddHHmm") + rn.Next(10000, 99999).ToString(); model.JiaoYiShiJian = DateTime.Now; model.DDCarrtes = DDleibie.机票订单; model.JinE = money; new Eyousoft_yhq.BLL.BConDetaile().Add(model); } if (result == 1) { var model = new Eyousoft_yhq.BLL.BJiPiaoBaoCun().GetModel(orderid); if (model == null) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "数据丢失,请重新操作")); } StringBuilder strbu = new StringBuilder(); strbu.Append("<?xml version=\"1.0\"?>"); strbu.Append("<AskOrderTicket_1_1>"); strbu.AppendFormat("<SubsOrderNo>{0}</SubsOrderNo>", model.OrderCode); strbu.AppendFormat("<ModifyTag>{0}</ModifyTag>", model.ModifyTag); strbu.AppendFormat("<NotifyURL>{0}</NotifyURL>", "http://www.4008005216.com/webMaster/JPBackRequest.aspx"); strbu.AppendFormat("<NotifyType>{0}</NotifyType>", "post"); strbu.AppendFormat("<BankCode>{0}</BankCode>", ""); strbu.AppendFormat("<BankNo>{0}</BankNo>", ""); strbu.AppendFormat("<BalanceDate>{0}</BalanceDate>", ""); strbu.AppendFormat("<PayType>{0}</PayType>", "QK"); strbu.AppendFormat("<PrintTktType>{0}</PrintTktType>", "B"); strbu.Append("</AskOrderTicket_1_1>"); var Result = new com._8222666.fxb2b.Service().XmlSubmit(getIdentityXMLString(), strbu.ToString(), ""); XmlDocument doc = new XmlDocument(); doc.LoadXml(Result); if (doc.SelectSingleNode("AskOrderTicket_1_1") != null && doc.SelectSingleNode("AskOrderTicket_1_1").SelectSingleNode("Status").InnerText == "OK") { model.payState = Eyousoft_yhq.Model.TickOrderPayState.出票中; bool mark = new Eyousoft_yhq.BLL.BJiPiaoBaoCun().setState(model); if (mark) { Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "支付成功,自动出票失败!")); } } else { Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "支付成功,自动出票失败!")); } } if (result == 1) { Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "支付成功,申请自动出票!")); } }