Example #1
0
        /// <summary>
        /// 管理员充值
        /// </summary>
        void PayOther()
        {
            string  userTo = Utils.GetQueryStringValue("a");
            decimal moneys = Utils.GetDecimal(Utils.GetQueryStringValue("m"));
            int     result = new Eyousoft_yhq.BLL.Member().HuiYuangZZ(userTo, moneys);

            if (result < 0)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "充值失败"));
            }
            if (result > 0)
            {
                Eyousoft_yhq.BLL.BConDetaile   ser   = new Eyousoft_yhq.BLL.BConDetaile();
                Eyousoft_yhq.Model.MConDetaile model = new Eyousoft_yhq.Model.MConDetaile();

                model.XFway = (Model.XFfangshi)Eyousoft_yhq.Model.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("a");
                var    modelUser = new Eyousoft_yhq.BLL.Member().GetModelByName(Mobile);
                model.HuiYuanID = modelUser.UserID;

                model.JiaoYiDuiXiang = modelUser.UserID;
                model.JinE           = moneys;
                model.DDCarrtes      = Eyousoft_yhq.Model.DDleibie.充值订单;
                new Eyousoft_yhq.BLL.BConDetaile().Add(model);
            }
            Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "充值成功"));
        }
Example #2
0
        /// <summary>
        /// 转账
        /// </summary>
        void PayOther()
        {
            string userTo = Utils.GetQueryStringValue("a");
            decimal moneys = Utils.GetDecimal(Utils.GetQueryStringValue("m"));
            int result = new Eyousoft_yhq.BLL.Member().UpdatePayState(HuiYuanInfo.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("a");
                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", "转帐成功"));
        }
Example #3
0
        /// <summary>
        /// 添加一个红包
        /// </summary>
        /// <param name="info">红包</param>
        /// <returns></returns>
        public int Insert(HongBao info)
        {
            if (string.IsNullOrEmpty(info.UserID))
            {
                return(0);
            }

            info.ID        = Guid.NewGuid().ToString();
            info.IssueTime = DateTime.Now;
            int result = dal.Insert(info);

            if (result == 1)//修改账户金额
            {
                Eyousoft_yhq.BLL.BConDetaile   bll = new Eyousoft_yhq.BLL.BConDetaile();
                Eyousoft_yhq.Model.MConDetaile con = new Eyousoft_yhq.Model.MConDetaile();
                con.JiaoYiHao      = info.IssueTime.ToString("yyyyMMddhhmmssfff");
                con.DingDanBianHao = info.IssueTime.ToString("yyyyMMddhhmmssfff");
                con.JinE           = info.HongBaoJinE;
                con.JiaoYiShiJian  = DateTime.Now;
                con.XFway          = Eyousoft_yhq.Model.XFfangshi.红包抽奖;
                con.HuiYuanID      = info.UserID;
                bll.Add(con);
            }

            return(result);
        }
Example #4
0
        /// <summary>
        /// 管理员充值
        /// </summary>
        void PayOther()
        {
            string userTo = Utils.GetQueryStringValue("a");
            decimal moneys = Utils.GetDecimal(Utils.GetQueryStringValue("m"));
            int result = new Eyousoft_yhq.BLL.Member().HuiYuangZZ(userTo, moneys);
            if (result < 0) Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "充值失败"));
            if (result > 0)
            {
                Eyousoft_yhq.BLL.BConDetaile ser = new Eyousoft_yhq.BLL.BConDetaile();
                Eyousoft_yhq.Model.MConDetaile model = new Eyousoft_yhq.Model.MConDetaile();

                model.XFway = (Model.XFfangshi)Eyousoft_yhq.Model.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("a");
                var modelUser = new Eyousoft_yhq.BLL.Member().GetModelByName(Mobile);
                model.HuiYuanID = modelUser.UserID;

                model.JiaoYiDuiXiang = modelUser.UserID;
                model.JinE = moneys;
                model.DDCarrtes = Eyousoft_yhq.Model.DDleibie.充值订单;
                new Eyousoft_yhq.BLL.BConDetaile().Add(model);

            }
            Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "充值成功"));
        }
Example #5
0
 /// <summary>
 /// 计算账户消费和充值
 /// </summary>
 protected void BingToalMoney()
 {
     Eyousoft_yhq.BLL.BConDetaile bll = new Eyousoft_yhq.BLL.BConDetaile();
     decimal xmoney = bll.GetTotalMoney(Eyousoft_yhq.Model.TotalMoney.账户充值金额);
     decimal cmoney = bll.GetTotalMoney(Eyousoft_yhq.Model.TotalMoney.账户消费金额);
     lblCZ.Text = (xmoney+ cmoney).ToString("C2");
     lblXF.Text = cmoney.ToString("C2");
 }
Example #6
0
        /// <summary>
        /// 计算账户消费和充值
        /// </summary>
        protected void BingToalMoney()
        {
            Eyousoft_yhq.BLL.BConDetaile bll = new Eyousoft_yhq.BLL.BConDetaile();
            decimal xmoney = bll.GetTotalMoney(Eyousoft_yhq.Model.TotalMoney.账户充值金额);
            decimal cmoney = bll.GetTotalMoney(Eyousoft_yhq.Model.TotalMoney.账户消费金额);

            lblCZ.Text = (xmoney + cmoney).ToString("C2");
            lblXF.Text = cmoney.ToString("C2");
        }
Example #7
0
        /// <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", "转帐成功"));
        }
Example #8
0
        /// <summary>
        /// 初始化列表
        /// </summary>
        protected void initList()
        {
            pageIndex = UtilsCommons.GetPagingIndex("Page");

            Eyousoft_yhq.BLL.BConDetaile bll = new Eyousoft_yhq.BLL.BConDetaile();

            var list = bll.GetModelList(pageSize, pageIndex, ref recordCount, null);

            if (list != null && list.Count > 0)
            {
                rpTicket.DataSource = list;
                rpTicket.DataBind();
                BindPage();
                litMsg.Visible = false;
            }
        }
Example #9
0
        /// <summary>
        /// 初始化列表
        /// </summary>
        protected void initList()
        {
            pageIndex = UtilsCommons.GetPagingIndex("Page");

            Eyousoft_yhq.BLL.BConDetaile bll = new Eyousoft_yhq.BLL.BConDetaile();

            var list = bll.GetModelList(pageSize, pageIndex, ref recordCount, null);

            if (list != null && list.Count > 0)
            {
                rpTicket.DataSource = list;
                rpTicket.DataBind();
                BindPage();
                litMsg.Visible = false;
            }
        }
Example #10
0
        /// <summary>
        /// 添加一个红包
        /// </summary>
        /// <param name="info">红包</param>
        /// <returns></returns>
        public int Insert(HongBao info)
        {
            if (string.IsNullOrEmpty(info.UserID)) return 0;

            info.ID = Guid.NewGuid().ToString();
            info.IssueTime = DateTime.Now;
            int result = dal.Insert(info);
            if (result == 1)//修改账户金额
            {
                Eyousoft_yhq.BLL.BConDetaile bll = new Eyousoft_yhq.BLL.BConDetaile();
                Eyousoft_yhq.Model.MConDetaile con = new Eyousoft_yhq.Model.MConDetaile();
                con.JiaoYiHao = info.IssueTime.ToString("yyyyMMddhhmmssfff");
                con.DingDanBianHao = info.IssueTime.ToString("yyyyMMddhhmmssfff");
                con.JinE = info.HongBaoJinE;
                con.JiaoYiShiJian = DateTime.Now;
                con.XFway = Eyousoft_yhq.Model.XFfangshi.红包抽奖;
                con.HuiYuanID = info.UserID;
                bll.Add(con);
            }

            return result;
        }
Example #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Dictionary <string, string> sPara = GetRequestGet();

            if (sPara.Count > 0)//判断是否有带返回参数
            {
                Notify aliNotify    = new Notify();
                bool   verifyResult = aliNotify.VerifyReturn(sPara, Request.QueryString["sign"]);

                if (verifyResult)//验证成功
                {
                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    //请在这里加上商户的业务逻辑程序代码


                    //——请根据您的业务逻辑来编写程序(以下代码仅作参考)——
                    //获取支付宝的通知返回参数,可参考技术文档中页面跳转同步通知参数列表

                    //商户订单号
                    string out_trade_no = Request.QueryString["out_trade_no"];

                    //支付宝交易号
                    string trade_no = Request.QueryString["trade_no"];

                    //交易状态
                    string result = Request.QueryString["result"];

                    Eyousoft_yhq.BLL.Order OrderType = new Eyousoft_yhq.BLL.Order();
                    var    OrderModel = new Eyousoft_yhq.Model.Order();
                    string res        = string.Empty;
                    if (result == "success")
                    {
                        //纪录充值消费纪录
                        try
                        {
                            string price = Request.QueryString["price"];
                            Eyousoft_yhq.BLL.BConDetaile   service = new Eyousoft_yhq.BLL.BConDetaile();
                            Eyousoft_yhq.Model.MConDetaile con     = new Eyousoft_yhq.Model.MConDetaile();
                            con.JiaoYiHao      = trade_no;
                            con.DingDanBianHao = out_trade_no;
                            con.JinE           = Decimal.Parse(price);
                            con.JiaoYiShiJian  = DateTime.Now;
                            con.XFway          = Eyousoft_yhq.Model.XFfangshi.消费;

                            EyouSoft.Model.SSOStructure.MUserInfo userInfo = Session["HuiYuanInfo"] as EyouSoft.Model.SSOStructure.MUserInfo;
                            con.HuiYuanID = userInfo.UserID;
                            service.Add(con);
                        }
                        catch (Exception)
                        {
                        }

                        OrderModel = OrderType.GetModel(out_trade_no);
                        if (OrderModel.PayState != Eyousoft_yhq.Model.PaymentState.已支付)
                        {
                            string Ra = Eyousoft_yhq.SQLServerDAL.Utils.GetRandomString(12);
                            while (OrderType.Exists(Ra))
                            {
                                Ra = Eyousoft_yhq.SQLServerDAL.Utils.GetRandomString(12);
                            }
                            Eyousoft_yhq.Model.Order OrderInfo = new Eyousoft_yhq.Model.Order()
                            {
                                OrderID     = out_trade_no,
                                PayState    = Eyousoft_yhq.Model.PaymentState.已支付,
                                ConfirmCode = Ra,
                                OrderState  = Eyousoft_yhq.Model.OrderState.已成交
                            };
                            int Sum = OrderType.UpdatePayState(OrderInfo);
                            if (Sum > 0)
                            {
                                Eyousoft_yhq.BLL.Member UM = new Eyousoft_yhq.BLL.Member();
                                bool Mo = UM.GetModel(OrderModel.MemberID).valiUser;
                                if (!Mo)
                                {
                                    #region 短信发送
                                    string code = string.Empty;
                                    IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels();
                                    //code = CreateZxingCode(Ra) + string.Format("下单成功,确认码:{0}!【惠旅游】", Ra);//生成二维码,发送彩信

                                    Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(OrderModel.MemberTel, code, channel[0], out res);//发送
                                    #endregion
                                    #region  短信日志
                                    Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                                    {
                                        TelCode  = OrderModel.MemberTel,
                                        MsgText  = code,
                                        ReResult = res
                                    };
                                    new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                                    #endregion
                                }
                            }
                        }
                    }


                    Response.Redirect("/AppPage/orderlist.aspx");

                    //——请根据您的业务逻辑来编写程序(以上代码仅作参考)——

                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////
                }
                else//验证失败
                {
                    Response.Write("验证失败");
                }
            }
            else
            {
                Response.Write("无返回参数");
            }
        }
Example #12
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", "支付成功,申请自动出票!"));
            }
        }
Example #13
0
        /// <summary>
        /// 分享链接后红包增值
        /// </summary>
        void HongBaoResult()
        {
            if (HuiYuanInfo == null)
            {
                Utils.RCWE_AJAX("0", "登陆后再操作");
            }
            Eyousoft_yhq.BLL.BHongBao bll = new Eyousoft_yhq.BLL.BHongBao();
            string  userid = HuiYuanInfo.UserID;// Utils.GetQueryStringValue("huiyuanid");
            decimal jine   = Utils.GetDecimal(Utils.GetFormValue("JINE"), 0M);

            if (jine < 50)
            {
                Utils.RCWE_AJAX("0", "注入金额不可小于50");
            }
            var member = new Eyousoft_yhq.BLL.Member().GetModel(userid);

            if (member == null)
            {
                Utils.RCWE_AJAX("0", "数据错误");
            }
            if (member.YuE < jine)  //如果不存在判断账户余额
            {
                Utils.RCWE_AJAX("-99", "账户余额不足,请充值");
            }

            bool isExists = bll.Exists(userid); //判断是否存在红包

            if (isExists)
            {
                //存在的话 增值
                var hongbao = bll.GetInfoByUserID(userid);
                if (hongbao == null)
                {
                    Utils.RCWE_AJAX("0", "数据错误");
                }
                hongbao.HongBaoJinE += jine;// getResult(hongbao.HongBaoJinE);
                int xgResult = bll.Update(hongbao);

                //添加消费明细
                if (xgResult == 1)
                {
                    var model = new Eyousoft_yhq.BLL.Member().GetModel(userid);
                    if (model != null)
                    {
                        new Eyousoft_yhq.BLL.Member().setMoney(userid, model.YuE - jine);
                    }


                    Eyousoft_yhq.BLL.BConDetaile   conBll = new Eyousoft_yhq.BLL.BConDetaile();
                    Eyousoft_yhq.Model.MConDetaile con    = new Eyousoft_yhq.Model.MConDetaile();
                    con.HuiYuanID      = userid;
                    con.JiaoYiHao      = DateTime.Now.ToString("yyyyMMddhhmmssfff");
                    con.DingDanBianHao = con.JiaoYiHao;
                    con.JinE           = jine;
                    con.JiaoYiShiJian  = DateTime.Now;
                    con.XFway          = Eyousoft_yhq.Model.XFfangshi.红包抽奖;
                    con.DDCarrtes      = Eyousoft_yhq.Model.DDleibie.红包消费;
                    conBll.Add(con);
                }
                Utils.RCWE_AJAX(xgResult == 1 ? "1" : "0", xgResult == 1 ? "操作成功" : "操作失败");
            }
            else
            {
                int tjResult = bll.Insert(new Eyousoft_yhq.Model.HongBao()
                {
                    HongBaoJinE = jine, UserID = userid
                });                                                                                                       //如果账户充足,添加红包

                if (tjResult == 1)
                {
                    var model = new Eyousoft_yhq.BLL.Member().GetModel(userid);
                    if (model != null)
                    {
                        new Eyousoft_yhq.BLL.Member().setMoney(userid, model.YuE - jine);
                    }
                }

                Utils.RCWE_AJAX(tjResult == 1 ? "1" : "0", tjResult == 1 ? "操作成功" : "操作失败");
            }
        }
Example #14
0
        /// <summary>
        /// 支付
        /// </summary>
        void setZF()
        {
            decimal money = Convert.ToDecimal(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 Eyousoft_yhq.Model.MJiPiaoBaoCun() { OpeatorID = userInfo.UserID, OrderID = orderid, payState = Eyousoft_yhq.Model.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 Eyousoft_yhq.Model.MConDetaile();
                model.HuiYuanID = userInfo.UserID;
                model.XFway = (Model.XFfangshi)Eyousoft_yhq.Model.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 = Eyousoft_yhq.Model.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", "支付成功!"));
        }
Example #15
0
        /// <summary>
        /// 分享链接后红包增值
        /// </summary>
        void HongBaoResult()
        {
            if (HuiYuanInfo == null) Utils.RCWE_AJAX("0", "登陆后再操作");
            Eyousoft_yhq.BLL.BHongBao bll = new Eyousoft_yhq.BLL.BHongBao();
            string userid = HuiYuanInfo.UserID;// Utils.GetQueryStringValue("huiyuanid");
            decimal jine = Utils.GetDecimal(Utils.GetFormValue("JINE"), 0M);
            if (jine < 50) Utils.RCWE_AJAX("0", "注入金额不可小于50");
            var member = new Eyousoft_yhq.BLL.Member().GetModel(userid);
            if (member == null) Utils.RCWE_AJAX("0", "数据错误");
            if (member.YuE < jine)  //如果不存在判断账户余额
            {
                Utils.RCWE_AJAX("-99", "账户余额不足,请充值");
            }

            bool isExists = bll.Exists(userid); //判断是否存在红包
            if (isExists)
            {
                //存在的话 增值
                var hongbao = bll.GetInfoByUserID(userid);
                if (hongbao == null) Utils.RCWE_AJAX("0", "数据错误");
                hongbao.HongBaoJinE += jine;// getResult(hongbao.HongBaoJinE);
                int xgResult = bll.Update(hongbao);

                //添加消费明细
                if (xgResult == 1)
                {

                    var model = new Eyousoft_yhq.BLL.Member().GetModel(userid);
                    if (model != null)
                    {
                        new Eyousoft_yhq.BLL.Member().setMoney(userid, model.YuE - jine);
                    }

                    Eyousoft_yhq.BLL.BConDetaile conBll = new Eyousoft_yhq.BLL.BConDetaile();
                    Eyousoft_yhq.Model.MConDetaile con = new Eyousoft_yhq.Model.MConDetaile();
                    con.HuiYuanID = userid;
                    con.JiaoYiHao = DateTime.Now.ToString("yyyyMMddhhmmssfff");
                    con.DingDanBianHao = con.JiaoYiHao;
                    con.JinE = jine;
                    con.JiaoYiShiJian = DateTime.Now;
                    con.XFway = Eyousoft_yhq.Model.XFfangshi.红包抽奖;
                    con.DDCarrtes = Eyousoft_yhq.Model.DDleibie.红包消费;
                    conBll.Add(con);
                }
                Utils.RCWE_AJAX(xgResult == 1 ? "1" : "0", xgResult == 1 ? "操作成功" : "操作失败");
            }
            else
            {

                int tjResult = bll.Insert(new Eyousoft_yhq.Model.HongBao() { HongBaoJinE = jine, UserID = userid });      //如果账户充足,添加红包

                if (tjResult == 1)
                {
                    var model = new Eyousoft_yhq.BLL.Member().GetModel(userid);
                    if (model != null)
                    {
                        new Eyousoft_yhq.BLL.Member().setMoney(userid, model.YuE - jine);
                    }
                }

                Utils.RCWE_AJAX(tjResult == 1 ? "1" : "0", tjResult == 1 ? "操作成功" : "操作失败");

            }
        }
Example #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Dictionary<string, string> sPara = GetRequestGet();

            if (sPara.Count > 0)//判断是否有带返回参数
            {
                Notify aliNotify = new Notify();
                bool verifyResult = aliNotify.VerifyReturn(sPara, Request.QueryString["sign"]);

                if (verifyResult)//验证成功
                {
                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    //请在这里加上商户的业务逻辑程序代码

                    //——请根据您的业务逻辑来编写程序(以下代码仅作参考)——
                    //获取支付宝的通知返回参数,可参考技术文档中页面跳转同步通知参数列表

                    //商户订单号
                    string out_trade_no = Request.QueryString["out_trade_no"];

                    //支付宝交易号
                    string trade_no = Request.QueryString["trade_no"];

                    //交易状态
                    string result = Request.QueryString["result"];

                    Eyousoft_yhq.BLL.Order OrderType = new Eyousoft_yhq.BLL.Order();
                    var OrderModel = new Eyousoft_yhq.Model.Order();
                    string res = string.Empty;
                    if (result == "success")
                    {
                        //纪录充值消费纪录
                        try
                        {
                            string price = Request.QueryString["price"];
                            Eyousoft_yhq.BLL.BConDetaile service = new Eyousoft_yhq.BLL.BConDetaile();
                            Eyousoft_yhq.Model.MConDetaile con = new Eyousoft_yhq.Model.MConDetaile();
                            con.JiaoYiHao = trade_no;
                            con.DingDanBianHao = out_trade_no;
                            con.JinE = Decimal.Parse(price);
                            con.JiaoYiShiJian = DateTime.Now;
                            con.XFway = Eyousoft_yhq.Model.XFfangshi.消费;

                            EyouSoft.Model.SSOStructure.MUserInfo userInfo = Session["HuiYuanInfo"] as EyouSoft.Model.SSOStructure.MUserInfo;
                            con.HuiYuanID = userInfo.UserID;
                            service.Add(con);
                        }
                        catch (Exception)
                        {

                        }

                        OrderModel = OrderType.GetModel(out_trade_no);
                        if (OrderModel.PayState != Eyousoft_yhq.Model.PaymentState.已支付)
                        {
                            string Ra = Eyousoft_yhq.SQLServerDAL.Utils.GetRandomString(12);
                            while (OrderType.Exists(Ra))
                            {
                                Ra = Eyousoft_yhq.SQLServerDAL.Utils.GetRandomString(12);
                            }
                            Eyousoft_yhq.Model.Order OrderInfo = new Eyousoft_yhq.Model.Order()
                            {
                                OrderID = out_trade_no,
                                PayState = Eyousoft_yhq.Model.PaymentState.已支付,
                                ConfirmCode = Ra,
                                OrderState = Eyousoft_yhq.Model.OrderState.已成交
                            };
                            int Sum = OrderType.UpdatePayState(OrderInfo);
                            if (Sum > 0)
                            {
                                Eyousoft_yhq.BLL.Member UM = new Eyousoft_yhq.BLL.Member();
                                bool Mo = UM.GetModel(OrderModel.MemberID).valiUser;
                                if (!Mo)
                                {

                                    #region 短信发送
                                    string code = string.Empty;
                                    IList<Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels();
                                    //code = CreateZxingCode(Ra) + string.Format("下单成功,确认码:{0}!【惠旅游】", Ra);//生成二维码,发送彩信

                                    Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(OrderModel.MemberTel, code, channel[0], out res);//发送
                                    #endregion
                                    #region  短信日志
                                    Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                                    {
                                        TelCode = OrderModel.MemberTel,
                                        MsgText = code,
                                        ReResult = res
                                    };
                                    new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                                    #endregion
                                }
                            }
                        }
                    }

                    Response.Redirect("/AppPage/orderlist.aspx");

                    //——请根据您的业务逻辑来编写程序(以上代码仅作参考)——

                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////
                }
                else//验证失败
                {
                    Response.Write("验证失败");
                }
            }
            else
            {
                Response.Write("无返回参数");
            }
        }