Example #1
0
        private void btnSubMitOrder_Click(object sender, System.EventArgs e)
        {
            OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(this.orderId);

            if (DateTime.Now < DateTime.Parse("2015-08-21"))
            {
                //判断该用户是否有参与首单的活动
                int result = ShoppingProcessor.CheckIsFirstOrder(HiContext.Current.User.UserId, (int)OrderSource.PC);
                if (result > 0 && orderInfo.ActivityType == 1)
                {
                    //this.ShowMessage("该用户已经参加过首单活动", false);
                    return;
                }
            }

            if (orderInfo != null)
            {
                if (orderInfo.Gateway != "ecdev.plugins.payment.advancerequest")
                {
                    System.Web.HttpContext.Current.Response.Redirect(Globals.GetSiteUrls().UrlData.FormatUrl("sendPayment", new object[]
                    {
                        this.orderId
                    }));
                    return;
                }
                System.Web.HttpContext.Current.Response.Redirect(string.Format("/user/pay.aspx?OrderId={0}", this.orderId));
            }
        }