Ejemplo n.º 1
0
        protected override void AttachChildControls()
        {
            this.litShipTo       = (Literal)this.FindControl("litShipTo");
            this.litCellPhone    = (Literal)this.FindControl("litCellPhone");
            this.litAddress      = (Literal)this.FindControl("litAddress");
            this.litShowMes      = (Literal)this.FindControl("litShowMes");
            this.GetUserCoupons  = MemberProcessor.GetUserCoupons();
            this.rptCartProducts = (VshopTemplatedRepeater)this.FindControl("rptCartProducts");
            this.rptCartProducts.ItemDataBound += new RepeaterItemEventHandler(this.rptCartProducts_ItemDataBound);
            this.litOrderTotal         = (Literal)this.FindControl("litOrderTotal");
            this.litPointNumber        = (Literal)this.FindControl("litPointNumber");
            this.litDisplayPointNumber = (Literal)this.FindControl("litDisplayPointNumber");
            this.aLinkToShipping       = (HtmlAnchor)this.FindControl("aLinkToShipping");
            this.groupbuyHiddenBox     = (HtmlInputControl)this.FindControl("groupbuyHiddenBox");
            this.rptAddress            = (VshopTemplatedRepeater)this.FindControl("rptAddress");
            this.selectShipTo          = (HtmlInputHidden)this.FindControl("selectShipTo");
            this.regionId      = (HtmlInputHidden)this.FindControl("regionId");
            this.litAddAddress = (Literal)this.FindControl("litAddAddress");
            IList <ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses();

            //if (CS$<>9__CachedAnonymousMethodDelegate2 == null)
            //{
            //    CS$<>9__CachedAnonymousMethodDelegate2 = new Func<ShippingAddressInfo, bool>(null, (IntPtr) <AttachChildControls>b__0);
            //}
            //this.rptAddress.DataSource = Enumerable.OrderBy<ShippingAddressInfo, bool>(shippingAddresses, CS$<>9__CachedAnonymousMethodDelegate2);
            //this.rptAddress.DataBind();
            //if (CS$<>9__CachedAnonymousMethodDelegate3 == null)
            //{
            //    CS$<>9__CachedAnonymousMethodDelegate3 = new Func<ShippingAddressInfo, bool>(null, (IntPtr) <AttachChildControls>b__1);
            //}
            this.rptAddress.DataSource = from item in shippingAddresses
                                         orderby item.IsDefault
                                         select item;

            this.rptAddress.DataBind();
            ShippingAddressInfo info = shippingAddresses.FirstOrDefault <ShippingAddressInfo>(item => item.IsDefault);

            //ShippingAddressInfo info = Enumerable.FirstOrDefault<ShippingAddressInfo>(shippingAddresses, CS$<>9__CachedAnonymousMethodDelegate3);
            if (info == null)
            {
                info = (shippingAddresses.Count > 0) ? shippingAddresses[0] : null;
            }
            if (info != null)
            {
                this.litShipTo.Text    = info.ShipTo;
                this.litCellPhone.Text = info.CellPhone;
                this.litAddress.Text   = info.Address;
                this.selectShipTo.SetWhenIsNotNull(info.ShippingId.ToString());
                this.regionId.SetWhenIsNotNull(info.RegionId.ToString());
            }
            this.litAddAddress.Text = " href='/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString()) + "'";
            if ((shippingAddresses == null) || (shippingAddresses.Count == 0))
            {
                this.Page.Response.Redirect(Globals.ApplicationPath + "/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString()));
            }
            else
            {
                this.aLinkToShipping.HRef = Globals.ApplicationPath + "/Vshop/ShippingAddresses.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString());
                List <ShoppingCartInfo> orderSummitCart = new List <ShoppingCartInfo>();
                if (((int.TryParse(this.Page.Request.QueryString["buyAmount"], out this.buyAmount) && !string.IsNullOrEmpty(this.Page.Request.QueryString["productSku"])) && !string.IsNullOrEmpty(this.Page.Request.QueryString["from"])) && ((this.Page.Request.QueryString["from"] == "signBuy") || (this.Page.Request.QueryString["from"] == "groupBuy")))
                {
                    this.productSku = this.Page.Request.QueryString["productSku"];
                    if (this.isbargain)
                    {
                        int bargainDetialId = Globals.RequestQueryNum("bargainDetialId");
                        orderSummitCart = ShoppingCartProcessor.GetListShoppingCart(this.productSku, this.buyAmount, bargainDetialId, 0);
                    }
                    else
                    {
                        int buyAmount = this.buyAmount;
                        int id        = Globals.RequestQueryNum("limitedTimeDiscountId");
                        if (id > 0)
                        {
                            bool flag = true;
                            LimitedTimeDiscountInfo discountInfo = LimitedTimeDiscountHelper.GetDiscountInfo(id);
                            if (discountInfo == null)
                            {
                                flag = false;
                            }
                            if (flag)
                            {
                                int num4 = ShoppingCartProcessor.GetLimitedTimeDiscountUsedNum(id, this.productSku, 0, base.CurrentMemberInfo.UserId, false);
                                if (MemberHelper.CheckCurrentMemberIsInRange(discountInfo.ApplyMembers, discountInfo.DefualtGroup, discountInfo.CustomGroup, base.CurrentMemberInfo.UserId))
                                {
                                    if ((discountInfo.LimitNumber > 0) && (this.buyAmount <= (discountInfo.LimitNumber - num4)))
                                    {
                                        buyAmount = discountInfo.LimitNumber - num4;
                                        if (buyAmount > this.buyAmount)
                                        {
                                            buyAmount = this.buyAmount;
                                        }
                                    }
                                    else if (discountInfo.LimitNumber != 0)
                                    {
                                        id = 0;
                                    }
                                }
                                else
                                {
                                    id = 0;
                                }
                            }
                            else
                            {
                                id = 0;
                            }
                        }
                        orderSummitCart = ShoppingCartProcessor.GetListShoppingCart(this.productSku, buyAmount, 0, id);
                    }
                }
                else
                {
                    orderSummitCart = ShoppingCartProcessor.GetOrderSummitCart();
                }
                if (orderSummitCart == null)
                {
                    HttpContext.Current.Response.Write("<script>alert('商品已下架或没有需要结算的订单!');location.href='/Vshop/ShoppingCart.aspx'</script>");
                }
                else
                {
                    if (orderSummitCart.Count > 1)
                    {
                        this.litShowMes.Text = "<div style=\"color: #F60; \"><img  src=\"/Utility/pics/u77.png\">您所购买的商品不支持同一个物流规则发货,系统自动拆分成多个子订单处理</div>";
                    }
                    this.rptCartProducts.DataSource = orderSummitCart;
                    this.rptCartProducts.DataBind();
                    decimal num5 = 0M;
                    decimal num6 = 0M;
                    decimal num7 = 0M;
                    int     num8 = 0;
                    foreach (ShoppingCartInfo info3 in orderSummitCart)
                    {
                        num8 += info3.GetPointNumber;
                        num5 += info3.Total;
                        num6 += info3.Exemption;
                        num7 += info3.ShipCost;
                    }
                    decimal num9 = num6;
                    this.litOrderTotal.Text = (num5 - num9).ToString("F2");
                    if (num8 == 0)
                    {
                        this.litDisplayPointNumber.Text = "style=\"display:none;\"";
                    }
                    this.litPointNumber.Text = num8.ToString();
                    PageTitle.AddSiteNameTitle("订单确认");
                }
            }
        }
Ejemplo n.º 2
0
        protected override void AttachChildControls()
        {
            this.litShipTo       = (Literal)this.FindControl("litShipTo");
            this.litCellPhone    = (Literal)this.FindControl("litCellPhone");
            this.litAddress      = (Literal)this.FindControl("litAddress");
            this.litShowMes      = (Literal)this.FindControl("litShowMes");
            this.GetUserCoupons  = MemberProcessor.GetUserCoupons();
            this.rptCartProducts = (VshopTemplatedRepeater)this.FindControl("rptCartProducts");
            this.rptCartProducts.ItemDataBound += new RepeaterItemEventHandler(this.rptCartProducts_ItemDataBound);
            this.litOrderTotal         = (Literal)this.FindControl("litOrderTotal");
            this.litPointNumber        = (Literal)this.FindControl("litPointNumber");
            this.litDisplayPointNumber = (Literal)this.FindControl("litDisplayPointNumber");
            this.aLinkToShipping       = (HtmlAnchor)this.FindControl("aLinkToShipping");
            this.groupbuyHiddenBox     = (HtmlInputControl)this.FindControl("groupbuyHiddenBox");
            this.rptAddress            = (VshopTemplatedRepeater)this.FindControl("rptAddress");

            //显示调用支付方式控件
            this.paymentTypeSel = (Common_PaymentTypeSelect)this.FindControl("paymenttypesel");
            paymentTypeSel.wid  = this.wid;

            this.selectShipTo  = (HtmlInputHidden)this.FindControl("selectShipTo");
            this.regionId      = (HtmlInputHidden)this.FindControl("regionId");
            this.litAddAddress = (Literal)this.FindControl("litAddAddress");



            IList <ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses();

            this.rptAddress.DataSource = from item in shippingAddresses
                                         orderby item.IsDefault
                                         select item;

            this.rptAddress.DataBind();
            ShippingAddressInfo info = shippingAddresses.FirstOrDefault <ShippingAddressInfo>(item => item.IsDefault);

            if (info == null)
            {
                info = (shippingAddresses.Count > 0) ? shippingAddresses[0] : null;
            }
            if (info != null)
            {
                this.litShipTo.Text    = info.ShipTo;
                this.litCellPhone.Text = info.CellPhone;
                this.litAddress.Text   = info.Address;
                this.selectShipTo.SetWhenIsNotNull(info.ShippingId.ToString());
                this.regionId.SetWhenIsNotNull(info.RegionId.ToString());
            }
            this.litAddAddress.Text = " href='/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString()) + "'";
            if ((shippingAddresses == null) || (shippingAddresses.Count == 0))
            {
                this.Page.Response.Redirect(Globals.ApplicationPath + "/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString()));
            }
            else
            {
                this.aLinkToShipping.HRef = Globals.ApplicationPath + "/Vshop/ShippingAddresses.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString());
                List <ShoppingCartInfo> listShoppingCart = new List <ShoppingCartInfo>();
                if (((int.TryParse(this.Page.Request.QueryString["buyAmount"], out this.buyAmount) && !string.IsNullOrEmpty(this.Page.Request.QueryString["productSku"])) && !string.IsNullOrEmpty(this.Page.Request.QueryString["from"])) && ((this.Page.Request.QueryString["from"] == "signBuy") || (this.Page.Request.QueryString["from"] == "groupBuy")))
                {
                    this.productSku  = this.Page.Request.QueryString["productSku"];
                    listShoppingCart = ShoppingCartProcessor.GetListShoppingCart(this.productSku, this.buyAmount);
                }
                else
                {
                    listShoppingCart = ShoppingCartProcessor.GetOrderSummitCart();
                }
                if (listShoppingCart == null)
                {
                    this.ShowMessage("没有需要结算的订单!", false);
                }
                else
                {
                    if (listShoppingCart.Count > 1)
                    {
                        this.litShowMes.Text = "<div style=\"color: #F60; \"><img  src=\"/Utility/pics/u77.png\">您所购买的商品不支持同一个物流规则发货,系统自动拆分成多个子订单处理</div>";
                    }
                    if (listShoppingCart != null)
                    {
                        this.rptCartProducts.DataSource = listShoppingCart;
                        this.rptCartProducts.DataBind();
                        decimal num  = 0M;
                        decimal num2 = 0M;
                        decimal num3 = 0M;
                        int     num4 = 0;
                        foreach (ShoppingCartInfo info2 in listShoppingCart)
                        {
                            num4 += info2.GetPointNumber;
                            num  += info2.Total;
                            num2 += info2.Exemption;
                            num3 += info2.ShipCost;
                        }
                        decimal num5 = num2;
                        this.litOrderTotal.Text = (num - num5).ToString("F2");
                        if (num4 == 0)
                        {
                            this.litDisplayPointNumber.Text = "style=\"display:none;\"";
                        }
                        this.litPointNumber.Text = num4.ToString();
                    }
                    else
                    {
                        this.Page.Response.Redirect("/Vshop/ShoppingCart.aspx");
                    }
                    PageTitle.AddSiteNameTitle("订单确认");
                }
            }
        }
Ejemplo n.º 3
0
        protected override void AttachChildControls()
        {
            this.litShipTo       = (System.Web.UI.WebControls.Literal) this.FindControl("litShipTo");
            this.litIsUseBalance = (System.Web.UI.WebControls.Literal) this.FindControl("litIsUseBalance");
            this.litCellPhone    = (System.Web.UI.WebControls.Literal) this.FindControl("litCellPhone");
            this.litAddress      = (System.Web.UI.WebControls.Literal) this.FindControl("litAddress");
            this.litShowMes      = (System.Web.UI.WebControls.Literal) this.FindControl("litShowMes");
            this.GetUserCoupons  = MemberProcessor.GetUserCoupons();
            this.rptCartProducts = (VshopTemplatedRepeater)this.FindControl("rptCartProducts");
            this.rptCartProducts.ItemDataBound += new System.Web.UI.WebControls.RepeaterItemEventHandler(this.rptCartProducts_ItemDataBound);
            this.litOrderTotal          = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderTotal");
            this.litPointNumber         = (System.Web.UI.WebControls.Literal) this.FindControl("litPointNumber");
            this.litUseMembersPointShow = (System.Web.UI.WebControls.Literal) this.FindControl("litUseMembersPointShow");
            this.litDisplayPointNumber  = (System.Web.UI.WebControls.Literal) this.FindControl("litDisplayPointNumber");
            this.litDisplayPoint        = (System.Web.UI.WebControls.Literal) this.FindControl("litDisplayPoint");
            this.BalanceCanPayMoney     = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("BalanceCanPayMoney");
            this.groupbuyHiddenBox      = (System.Web.UI.HtmlControls.HtmlInputControl) this.FindControl("groupbuyHiddenBox");
            this.rptAddress             = (VshopTemplatedRepeater)this.FindControl("rptAddress");
            this.selectShipTo           = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("selectShipTo");
            this.MembersPointMoney      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("MembersPointMoney");
            this.regionId      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("regionId");
            this.litAddAddress = (System.Web.UI.WebControls.Literal) this.FindControl("litAddAddress");

            if (Globals.GetCurrentDistributorId() == CurrentMemberInfo.UserId)
            {
                base.GotoResourceNotFound("站点管理员无法在自己店内购买!");
                return;
            }
            if (Globals.GetCurrentDistributorId() == 0)//CurrentMemberInfo.ReferralUserId ==0  &&
            {
                base.GotoResourceNotFound("请先扫码关注站点后再下单!");
                return;
            }


            System.Collections.Generic.IList <ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses();
            this.rptAddress.DataSource = from item in shippingAddresses
                                         orderby item.IsDefault
                                         select item;

            this.rptAddress.DataBind();
            ShippingAddressInfo shippingAddressInfo = shippingAddresses.FirstOrDefault((ShippingAddressInfo item) => item.IsDefault);

            if (!string.IsNullOrEmpty(this.Page.Request.QueryString["startDate"]))
            {
                this.SendStartDate = DateTime.Parse(this.Page.Request.QueryString["startDate"]);
            }
            if (!string.IsNullOrEmpty(this.Page.Request.QueryString["quantityPerDay"]))
            {
                this.QuantityPerDay = Convert.ToInt32(this.Page.Request.QueryString["quantityPerDay"]);
            }
            if (!string.IsNullOrEmpty(this.Page.Request.QueryString["sendDays"]))
            {
                this.SendDays = Convert.ToInt32(this.Page.Request.QueryString["sendDays"]);
            }


            if (shippingAddressInfo == null)
            {
                shippingAddressInfo = ((shippingAddresses.Count > 0) ? shippingAddresses[0] : null);
            }
            if (shippingAddressInfo != null)
            {
                this.litShipTo.Text    = shippingAddressInfo.ShipTo;
                this.litCellPhone.Text = shippingAddressInfo.CellPhone;
                this.litAddress.Text   = shippingAddressInfo.Address;
                this.selectShipTo.SetWhenIsNotNull(shippingAddressInfo.ShippingId.ToString());
                this.regionId.SetWhenIsNotNull(shippingAddressInfo.RegionId.ToString());
            }
            this.litAddAddress.Text = "<li><a href='/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(System.Web.HttpContext.Current.Request.Url.ToString()) + "'>新增收货地址</a></li>";
            if (shippingAddresses == null || shippingAddresses.Count == 0)
            {
                this.Page.Response.Redirect(Globals.ApplicationPath + "/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(System.Web.HttpContext.Current.Request.Url.ToString()));
            }
            else
            {
                System.Collections.Generic.List <ShoppingCartInfo> list = new System.Collections.Generic.List <ShoppingCartInfo>();
                if (int.TryParse(this.Page.Request.QueryString["buyAmount"], out this.buyAmount) && !string.IsNullOrEmpty(this.Page.Request.QueryString["productSku"]) && !string.IsNullOrEmpty(this.Page.Request.QueryString["from"]) && (this.Page.Request.QueryString["from"] == "signBuy" || this.Page.Request.QueryString["from"] == "groupBuy"))
                {
                    this.productSku = this.Page.Request.QueryString["productSku"];
                    if (this.isbargain)
                    {
                        int bargainDetialId = Globals.RequestQueryNum("bargainDetialId");
                        list = ShoppingCartProcessor.GetListShoppingCart(this.productSku, this.buyAmount, bargainDetialId, 0);
                    }
                    else
                    {
                        int num  = this.buyAmount;
                        int num2 = Globals.RequestQueryNum("limitedTimeDiscountId");
                        if (num2 > 0)
                        {
                            bool flag = true;
                            LimitedTimeDiscountInfo discountInfo = LimitedTimeDiscountHelper.GetDiscountInfo(num2);
                            if (discountInfo == null)
                            {
                                flag = false;
                            }
                            if (flag)
                            {
                                if (MemberHelper.CheckCurrentMemberIsInRange(discountInfo.ApplyMembers, discountInfo.DefualtGroup, discountInfo.CustomGroup, this.CurrentMemberInfo.UserId))
                                {
                                    if (discountInfo.LimitNumber != 0)
                                    {
                                        int limitedTimeDiscountUsedNum = ShoppingCartProcessor.GetLimitedTimeDiscountUsedNum(num2, this.productSku, 0, this.CurrentMemberInfo.UserId, false);
                                        if (this.buyAmount > discountInfo.LimitNumber - limitedTimeDiscountUsedNum)
                                        {
                                            num = discountInfo.LimitNumber - limitedTimeDiscountUsedNum;
                                        }
                                    }
                                }
                                else
                                {
                                    num2 = 0;
                                }
                            }
                            else
                            {
                                num2 = 0;
                            }
                        }
                        if (num2 > 0)
                        {
                            ShoppingCartProcessor.RemoveLineItem(this.productSku, 0, num2);
                        }
                        if (num == 0 && num2 > 0)
                        {
                            num  = this.buyAmount;
                            num2 = 0;
                        }
                        list = ShoppingCartProcessor.GetListShoppingCart(SendStartDate, QuantityPerDay, SendDays, this.productSku, num, 0, num2);
                    }
                }
                else
                {
                    list = ShoppingCartProcessor.GetOrderSummitCart();
                }
                if (list == null)
                {
                    System.Web.HttpContext.Current.Response.Write("<script>alert('商品已下架或没有需要结算的订单!');location.href='/Vshop/ShoppingCart.aspx'</script>");
                }
                else
                {
                    if (list.Count > 1)
                    {
                        this.litShowMes.Text = "<div style=\"color: #F60; \"><img  src=\"/Utility/pics/u77.png\">您所购买的商品不支持同一个物流规则发货,系统自动拆分成多个子订单处理</div>";
                    }
                    this.rptCartProducts.DataSource = list;
                    this.rptCartProducts.DataBind();
                    decimal d    = 0m;
                    decimal num3 = 0m;
                    decimal d2   = 0m;
                    int     num4 = 0;
                    foreach (ShoppingCartInfo current in list)
                    {
                        num4 += current.GetPointNumber;
                        d    += current.Total;
                        num3 += current.Exemption;
                        d2   += current.ShipCost;
                    }
                    decimal d3   = num3;
                    decimal num5 = d - d3;
                    if (num5 <= 0m)
                    {
                        num5 = 0m;
                    }
                    num5 = decimal.Round(num5, 2);
                    this.litOrderTotal.Text = num5.ToString("F2");
                    if (num4 == 0)
                    {
                        this.litDisplayPointNumber.Text = "style=\"display:none;\"";
                    }
                    this.litPointNumber.Text = num4.ToString();
                    int          num6           = this.CurrentMemberInfo.Points - num4;
                    SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
                    decimal      num7;
                    if (num5 * masterSettings.PointToCashRate > this.CurrentMemberInfo.Points)
                    {
                        if (num6 > masterSettings.PonitToCash_MaxAmount * masterSettings.PointToCashRate)
                        {
                            num7 = masterSettings.PonitToCash_MaxAmount;
                            num6 = (int)masterSettings.PonitToCash_MaxAmount * masterSettings.PointToCashRate;
                        }
                        else
                        {
                            num7 = num6 / masterSettings.PointToCashRate;
                        }
                    }
                    else
                    {
                        num7 = masterSettings.PonitToCash_MaxAmount;
                        if (num7 > num5)
                        {
                            num7 = num5;
                        }
                        num7 = decimal.Round(num7, 2);
                        num6 = (int)(num7 * masterSettings.PointToCashRate);
                    }
                    if (num6 <= 0)
                    {
                        num6 = 0;
                        num7 = 0m;
                    }
                    this.MembersPointMoney.Value = num7.ToString("F2");
                    if (num6 > 0)
                    {
                        this.litUseMembersPointShow.Text = string.Concat(new object[]
                        {
                            "<input type='hidden' id='hdCanUsePoint' value='",
                            num6,
                            "'/><input type='hidden' id='hdCanUsePointMoney' value='",
                            num7.ToString("F2"),
                            "'/><div class=\"prompt-text pull-left\" id=\"divUseMembersPointShow\">可用<span  id=\"usepointnum\">",
                            num6,
                            "</span>积分抵 <span class=\"colorr\">¥<span  id=\"usepointmoney\">",
                            num7.ToString("F2"),
                            "</span></span>元</div><div class=\"switch pull-right\" id=\"mySwitchUseMembersPoint\"><input  type=\"checkbox\" /></div>"
                        });
                    }
                    else
                    {
                        this.litUseMembersPointShow.Text = "<input type='hidden' id='hdCanUsePoint' value='0'/><input type='hidden' id='hdCanUsePointMoney' value='0'/><div class=\"prompt-text pull-left\" id=\"divUseMembersPointShow\">可用<span  id=\"usepointnum\">0</span>积分 <span  id=\"usepointmoney\" style=\"display:none\">" + num7.ToString("F2") + "</span></div><div class=\"switch pull-right\" id=\"mySwitchUseMembersPoint\" style=\"display:none\"><input type=\"checkbox\" disabled /></div>";
                    }
                    decimal d4;
                    if (num5 > this.CurrentMemberInfo.AvailableAmount)
                    {
                        d4 = this.CurrentMemberInfo.AvailableAmount;
                        this.BalanceCanPayMoney.Value = this.CurrentMemberInfo.AvailableAmount.ToString("F2");
                    }
                    else
                    {
                        d4 = num5;
                        this.BalanceCanPayMoney.Value = num5.ToString("F2");
                    }
                    if (this.CurrentMemberInfo.AvailableAmount > 0m && masterSettings.EnableBalancePayment)
                    {
                        this.litIsUseBalance.Text = string.Concat(new string[]
                        {
                            "<div class=\"prompt-text pull-left\">余额支付 <span class=\"colorr\">¥<span id=\"spCanpayMoney\">",
                            d4.ToString("F2"),
                            "</span></span>(可用 ¥<span id=\"spAvailableAmount\">",
                            this.CurrentMemberInfo.AvailableAmount.ToString("F2"),
                            "</span>)</div><div class=\"switch pull-right\" id=\"mySwitchUseBalance\"><input type=\"checkbox\" ",
                            (d4 > 0m) ? "" : " disabled",
                            " /></div></div>"
                        });
                    }
                    else
                    {
                        this.litIsUseBalance.Text = "<div class=\"prompt-text pull-left\"" + (masterSettings.EnableBalancePayment ? "" : " style=\"display:none\"") + ">余额可用 <span class=\"colorr\">¥<span id=\"spCanpayMoney\">0.00</span></span><span id=\"spAvailableAmount\" style=\"display:none\">0.00</span></div><div class=\"switch pull-right\" id=\"mySwitchUseBalance\" style=\"display:none\"><input type=\"checkbox\" disabled /></div></div>";
                    }
                    if (!masterSettings.PonitToCash_Enable)
                    {
                        this.litDisplayPoint.Text = " style=\"display:none;\"";
                    }
                    PageTitle.AddSiteNameTitle("订单确认");
                }
            }
        }
Ejemplo n.º 4
0
        protected override void AttachChildControls()
        {
            this.objRadio             = new HtmlInputRadioButton[3];
            this.objRadio[0]          = (HtmlInputRadioButton)this.FindControl("OS1");
            this.objRadio[1]          = (HtmlInputRadioButton)this.FindControl("OS2");
            this.objRadio[2]          = (HtmlInputRadioButton)this.FindControl("OS3");
            this.objRadio[1].Disabled = true;
            this.objRadio[2].Disabled = true;
            this.dtGeadeInfo          = MemberProcessor.dtGetGradeInfofromUserId();
            if (this.dtGeadeInfo.Rows.Count > 0)
            {
                if ((bool)this.dtGeadeInfo.Rows[0]["IsDaifa"] == false && (bool)this.dtGeadeInfo.Rows[0]["IsPifa"] == false)
                {
                    this.objRadio[0].Disabled = false;
                    this.objRadio[0].Checked  = true;
                    this.objRadio[1].Checked  = false;
                    this.objRadio[2].Checked  = false;
                }
                if ((bool)this.dtGeadeInfo.Rows[0]["IsDaifa"] == true)
                {
                    this.objRadio[0].Disabled = true;
                    this.objRadio[1].Disabled = false;
                    this.objRadio[0].Checked  = false;
                    this.objRadio[1].Checked  = true;
                    this.objRadio[2].Checked  = false;
                }
                else
                {
                    this.objRadio[1].Disabled = true;
                }
                if ((bool)this.dtGeadeInfo.Rows[0]["IsPifa"] == true)
                {
                    this.objRadio[0].Disabled = true;
                    this.objRadio[2].Disabled = false;
                    this.objRadio[0].Checked  = false;
                    this.objRadio[1].Checked  = false;
                    this.objRadio[2].Checked  = true;
                }
                else
                {
                    this.objRadio[2].Disabled = true;
                }
            }
            switch (this.Page.Request.QueryString["GSO"])
            {
            case "0":
                this.objRadio[0].Checked = true;
                this.objRadio[1].Checked = false;
                this.objRadio[2].Checked = false;
                break;

            case "1":
                this.objRadio[0].Checked = false;
                this.objRadio[1].Checked = true;
                this.objRadio[2].Checked = false;
                break;

            case "2":
                this.objRadio[0].Checked = false;
                this.objRadio[1].Checked = false;
                this.objRadio[2].Checked = true;
                break;
            }
            this.litShipTo       = (Literal)this.FindControl("litShipTo");
            this.litIsUseBalance = (Literal)this.FindControl("litIsUseBalance");
            this.litCellPhone    = (Literal)this.FindControl("litCellPhone");
            this.litAddress      = (Literal)this.FindControl("litAddress");
            this.litShowMes      = (Literal)this.FindControl("litShowMes");
            this.GetUserCoupons  = MemberProcessor.GetUserCoupons();
            this.rptCartProducts = (VshopTemplatedRepeater)this.FindControl("rptCartProducts");
            this.rptCartProducts.ItemDataBound += new RepeaterItemEventHandler(this.rptCartProducts_ItemDataBound);
            this.litOrderTotal          = (Literal)this.FindControl("litOrderTotal");
            this.litPointNumber         = (Literal)this.FindControl("litPointNumber");
            this.litUseMembersPointShow = (Literal)this.FindControl("litUseMembersPointShow");
            this.litDisplayPointNumber  = (Literal)this.FindControl("litDisplayPointNumber");
            this.litDisplayPoint        = (Literal)this.FindControl("litDisplayPoint");
            this.BalanceCanPayMoney     = (HtmlInputHidden)this.FindControl("BalanceCanPayMoney");
            this.groupbuyHiddenBox      = (HtmlInputControl)this.FindControl("groupbuyHiddenBox");
            this.rptAddress             = (VshopTemplatedRepeater)this.FindControl("rptAddress");
            this.selectShipTo           = (HtmlInputHidden)this.FindControl("selectShipTo");
            this.MembersPointMoney      = (HtmlInputHidden)this.FindControl("MembersPointMoney");
            this.regionId             = (HtmlInputHidden)this.FindControl("regionId");
            this.litAddAddress        = (Literal)this.FindControl("litAddAddress");
            this.litServiceMoney      = (Literal)this.FindControl("litServiceMoney");
            this.litServiceMoney.Text = "0.00";
            IList <ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses();

            if (!this.objRadio[2].Checked == true)
            {
                this.rptAddress.DataSource = from item in shippingAddresses
                                             orderby item.IsDefault
                                             select item;
                this.rptAddress.DataBind();
                ShippingAddressInfo info = shippingAddresses.FirstOrDefault <ShippingAddressInfo>(item => item.IsDefault);
                if (info == null)
                {
                    info = (shippingAddresses.Count > 0) ? shippingAddresses[0] : null;
                }
                if (info != null)
                {
                    this.litShipTo.Text    = info.ShipTo;
                    this.litCellPhone.Text = info.CellPhone;
                    this.litAddress.Text   = info.Address;
                    this.selectShipTo.SetWhenIsNotNull(info.ShippingId.ToString());
                    this.regionId.SetWhenIsNotNull(info.RegionId.ToString());
                }
                this.litAddAddress.Text = "<li><a href='/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString()) + "'>新增收货地址</a></li>";
            }
            else
            {
                MemberInfo          member = MemberHelper.GetMember(Globals.GetCurrentMemberUserId(false));
                ShippingAddressInfo sai    = new ShippingAddressInfo();
                sai.Address       = member.Address;
                sai.CellPhone     = member.CellPhone;
                sai.IsDefault     = true;
                sai.RegionId      = member.RegionId;
                sai.ShippingId    = 999;
                sai.ShipTo        = member.RealName;
                sai.TelPhone      = member.CellPhone;
                sai.UserId        = Globals.GetCurrentMemberUserId(false);
                sai.Zipcode       = "";
                shippingAddresses = new List <ShippingAddressInfo>();
                shippingAddresses.Add(sai);
                this.rptAddress.DataSource = from item in shippingAddresses
                                             orderby item.IsDefault
                                             select item;
                this.rptAddress.DataBind();
                ShippingAddressInfo info = shippingAddresses.FirstOrDefault <ShippingAddressInfo>(item => item.IsDefault);
                if (info == null)
                {
                    info = (shippingAddresses.Count > 0) ? shippingAddresses[0] : null;
                }
                if (info != null)
                {
                    this.litShipTo.Text    = info.ShipTo;
                    this.litCellPhone.Text = info.CellPhone;
                    this.litAddress.Text   = info.Address;
                    this.selectShipTo.SetWhenIsNotNull(info.ShippingId.ToString());
                    this.regionId.SetWhenIsNotNull(info.RegionId.ToString());
                }
                this.litAddAddress.Text = "<li><a href='" + this.Page.Request.Url.ToString() + "'>批发订单不能指定收货地址,如需修改批发订单收货地址,请与管理员联系</a></li>";
            }
            if (((shippingAddresses == null) || (shippingAddresses.Count == 0)) && !this.objRadio[2].Checked == true)
            {
                this.Page.Response.Redirect(Globals.ApplicationPath + "/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString()));
            }
            else
            {
                List <ShoppingCartInfo> orderSummitCart = new List <ShoppingCartInfo>();
                if (((int.TryParse(this.Page.Request.QueryString["buyAmount"], out this.buyAmount) && !string.IsNullOrEmpty(this.Page.Request.QueryString["productSku"])) && !string.IsNullOrEmpty(this.Page.Request.QueryString["from"])) && ((this.Page.Request.QueryString["from"] == "signBuy") || (this.Page.Request.QueryString["from"] == "groupBuy")))
                {
                    this.productSku = this.Page.Request.QueryString["productSku"];
                    if (this.isbargain)
                    {
                        int bargainDetialId = Globals.RequestQueryNum("bargainDetialId");
                        orderSummitCart = ShoppingCartProcessor.GetListShoppingCart(this.productSku, this.buyAmount, bargainDetialId, 0);
                    }
                    else
                    {
                        int buyAmount = this.buyAmount;
                        int id        = Globals.RequestQueryNum("limitedTimeDiscountId");
                        if (id > 0)
                        {
                            bool flag = true;
                            LimitedTimeDiscountInfo discountInfo = LimitedTimeDiscountHelper.GetDiscountInfo(id);
                            if (discountInfo == null)
                            {
                                flag = false;
                            }
                            if (flag)
                            {
                                if (MemberHelper.CheckCurrentMemberIsInRange(discountInfo.ApplyMembers, discountInfo.DefualtGroup, discountInfo.CustomGroup, base.CurrentMemberInfo.UserId))
                                {
                                    if (discountInfo.LimitNumber != 0)
                                    {
                                        int num4 = ShoppingCartProcessor.GetLimitedTimeDiscountUsedNum(id, this.productSku, 0, base.CurrentMemberInfo.UserId, false);
                                        if (this.buyAmount > (discountInfo.LimitNumber - num4))
                                        {
                                            buyAmount = discountInfo.LimitNumber - num4;
                                        }
                                    }
                                }
                                else
                                {
                                    id = 0;
                                }
                            }
                            else
                            {
                                id = 0;
                            }
                        }
                        if (id > 0)
                        {
                            ShoppingCartProcessor.RemoveLineItem(this.productSku, 0, id);
                        }
                        if ((buyAmount == 0) && (id > 0))
                        {
                            buyAmount = this.buyAmount;
                            id        = 0;
                        }
                        orderSummitCart = ShoppingCartProcessor.GetListShoppingCart(this.productSku, buyAmount, 0, id);
                    }
                }
                else
                {
                    orderSummitCart = ShoppingCartProcessor.GetOrderSummitCart();
                }
                if (orderSummitCart == null)
                {
                    HttpContext.Current.Response.Write("<script>alert('商品已下架或没有需要结算的订单!');location.href='/Vshop/ShoppingCart.aspx'</script>");
                }
                else
                {
                    if (orderSummitCart.Count > 1)
                    {
                        this.litShowMes.Text = "<div style=\"color: #F60; \"><img  src=\"/Utility/pics/u77.png\">您所购买的商品不支持同一个物流规则发货,系统自动拆分成多个子订单处理</div>";
                    }
                    this.rptCartProducts.DataSource = orderSummitCart;
                    this.rptCartProducts.DataBind();
                    decimal num5        = 0M;
                    decimal num6        = 0M;
                    decimal num7        = 0M;
                    int     num8        = 0;
                    int     intOrderNum = 0;
                    foreach (ShoppingCartInfo info3 in orderSummitCart)
                    {
                        num8        += info3.GetPointNumber;
                        num5        += info3.Total;
                        num6        += info3.Exemption;
                        num7        += info3.ShipCost;
                        intOrderNum += info3.GetQuantity();
                    }
                    decimal num9 = num6;
                    decimal d    = num5 - num9;
                    if (d <= 0M)
                    {
                        d = 0M;
                    }
                    d = decimal.Round(d, 2);
                    if (this.objRadio[1].Checked == true)
                    {
                        this.litServiceMoney.Text = (intOrderNum * intPerServiceMoney).ToString("0.00");
                        d += decimal.Round(intOrderNum * intPerServiceMoney, 2);
                    }
                    else
                    {
                        this.litServiceMoney.Text = "0.00";
                    }
                    this.litOrderTotal.Text = d.ToString("F2");
                    if (num8 == 0)
                    {
                        this.litDisplayPointNumber.Text = "style=\"display:none;\"";
                    }
                    this.litPointNumber.Text = num8.ToString();
                    int          num11          = base.CurrentMemberInfo.Points - num8;
                    decimal      num12          = 0M;
                    SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
                    if ((d * masterSettings.PointToCashRate) > base.CurrentMemberInfo.Points)
                    {
                        if (num11 > (masterSettings.PonitToCash_MaxAmount * masterSettings.PointToCashRate))
                        {
                            num12 = masterSettings.PonitToCash_MaxAmount;
                            num11 = ((int)masterSettings.PonitToCash_MaxAmount) * masterSettings.PointToCashRate;
                        }
                        else
                        {
                            num12 = num11 / masterSettings.PointToCashRate;
                        }
                    }
                    else
                    {
                        num12 = masterSettings.PonitToCash_MaxAmount;
                        if (num12 > d)
                        {
                            num12 = d;
                        }
                        num12 = decimal.Round(num12, 2);
                        num11 = (int)(num12 * masterSettings.PointToCashRate);
                    }
                    if (num11 <= 0)
                    {
                        num11 = 0;
                        num12 = 0M;
                    }
                    this.MembersPointMoney.Value = num12.ToString("F2");
                    if (num11 > 0)
                    {
                        this.litUseMembersPointShow.Text = string.Concat(new object[] { "<input type='hidden' id='hdCanUsePoint' value='", num11, "'/><input type='hidden' id='hdCanUsePointMoney' value='", num12.ToString("F2"), "'/><div class=\"prompt-text pull-left\" id=\"divUseMembersPointShow\">可用<span  id=\"usepointnum\">", num11, "</span>积分抵 <span class=\"colorr\">\x00a5<span  id=\"usepointmoney\">", num12.ToString("F2"), "</span></span>元</div><div class=\"switch pull-right\" id=\"mySwitchUseMembersPoint\"><input  type=\"checkbox\" /></div>" });
                    }
                    else
                    {
                        this.litUseMembersPointShow.Text = "<input type='hidden' id='hdCanUsePoint' value='0'/><input type='hidden' id='hdCanUsePointMoney' value='0'/><div class=\"prompt-text pull-left\" id=\"divUseMembersPointShow\">可用<span  id=\"usepointnum\">0</span>积分 <span  id=\"usepointmoney\" style=\"display:none\">" + num12.ToString("F2") + "</span></div><div class=\"switch pull-right\" id=\"mySwitchUseMembersPoint\" style=\"display:none\"><input type=\"checkbox\" disabled /></div>";
                    }
                    decimal availableAmount = 0M;
                    if (d > base.CurrentMemberInfo.AvailableAmount)
                    {
                        availableAmount = base.CurrentMemberInfo.AvailableAmount;
                        this.BalanceCanPayMoney.Value = base.CurrentMemberInfo.AvailableAmount.ToString("F2");
                    }
                    else
                    {
                        availableAmount = d;
                        this.BalanceCanPayMoney.Value = d.ToString("F2");
                    }
                    if ((base.CurrentMemberInfo.AvailableAmount > 0M) && masterSettings.EnableBalancePayment)
                    {
                        this.litIsUseBalance.Text = "<div class=\"prompt-text pull-left\">余额支付 <span class=\"colorr\">\x00a5<span id=\"spCanpayMoney\">" + availableAmount.ToString("F2") + "</span></span>(可用 \x00a5<span id=\"spAvailableAmount\">" + base.CurrentMemberInfo.AvailableAmount.ToString("F2") + "</span>)</div><div class=\"switch pull-right\" id=\"mySwitchUseBalance\"><input type=\"checkbox\" " + ((availableAmount > 0M) ? "" : " disabled") + " /></div></div>";
                    }
                    else
                    {
                        this.litIsUseBalance.Text = "<div class=\"prompt-text pull-left\"" + (masterSettings.EnableBalancePayment ? "" : " style=\"display:none\"") + ">余额可用 <span class=\"colorr\">\x00a5<span id=\"spCanpayMoney\">0.00</span></span><span id=\"spAvailableAmount\" style=\"display:none\">0.00</span></div><div class=\"switch pull-right\" id=\"mySwitchUseBalance\" style=\"display:none\"><input type=\"checkbox\" disabled /></div></div>";
                    }
                    if (!masterSettings.PonitToCash_Enable)
                    {
                        this.litDisplayPoint.Text = " style=\"display:none;\"";
                    }
                    PageTitle.AddSiteNameTitle("订单确认");
                }
            }
        }
Ejemplo n.º 5
0
        protected override void AttachChildControls()
        {
            this.litShipTo       = (System.Web.UI.WebControls.Literal) this.FindControl("litShipTo");
            this.litCellPhone    = (System.Web.UI.WebControls.Literal) this.FindControl("litCellPhone");
            this.litAddress      = (System.Web.UI.WebControls.Literal) this.FindControl("litAddress");
            this.litShowMes      = (System.Web.UI.WebControls.Literal) this.FindControl("litShowMes");
            this.GetUserCoupons  = MemberProcessor.GetUserCoupons();
            this.rptCartProducts = (VshopTemplatedRepeater)this.FindControl("rptCartProducts");
            this.rptCartProducts.ItemDataBound += new System.Web.UI.WebControls.RepeaterItemEventHandler(this.rptCartProducts_ItemDataBound);
            this.litOrderTotal         = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderTotal");
            this.litPointNumber        = (System.Web.UI.WebControls.Literal) this.FindControl("litPointNumber");
            this.litDisplayPointNumber = (System.Web.UI.WebControls.Literal) this.FindControl("litDisplayPointNumber");
            this.aLinkToShipping       = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("aLinkToShipping");
            this.groupbuyHiddenBox     = (System.Web.UI.HtmlControls.HtmlInputControl) this.FindControl("groupbuyHiddenBox");
            this.rptAddress            = (VshopTemplatedRepeater)this.FindControl("rptAddress");
            this.selectShipTo          = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("selectShipTo");
            this.regionId      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("regionId");
            this.litAddAddress = (System.Web.UI.WebControls.Literal) this.FindControl("litAddAddress");
            System.Collections.Generic.IList <ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses();
            this.rptAddress.DataSource = from item in shippingAddresses
                                         orderby item.IsDefault
                                         select item;

            this.rptAddress.DataBind();
            ShippingAddressInfo shippingAddressInfo = shippingAddresses.FirstOrDefault((ShippingAddressInfo item) => item.IsDefault);

            if (shippingAddressInfo == null)
            {
                shippingAddressInfo = ((shippingAddresses.Count > 0) ? shippingAddresses[0] : null);
            }
            if (shippingAddressInfo != null)
            {
                this.litShipTo.Text    = shippingAddressInfo.ShipTo;
                this.litCellPhone.Text = shippingAddressInfo.CellPhone;
                this.litAddress.Text   = shippingAddressInfo.Address;
                this.selectShipTo.SetWhenIsNotNull(shippingAddressInfo.ShippingId.ToString());
                this.regionId.SetWhenIsNotNull(shippingAddressInfo.RegionId.ToString());
            }
            this.litAddAddress.Text = " href='/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(System.Web.HttpContext.Current.Request.Url.ToString()) + "'";
            if (shippingAddresses == null || shippingAddresses.Count == 0)
            {
                this.Page.Response.Redirect(Globals.ApplicationPath + "/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(System.Web.HttpContext.Current.Request.Url.ToString()));
            }
            else
            {
                this.aLinkToShipping.HRef = Globals.ApplicationPath + "/Vshop/ShippingAddresses.aspx?returnUrl=" + Globals.UrlEncode(System.Web.HttpContext.Current.Request.Url.ToString());
                System.Collections.Generic.List <ShoppingCartInfo> list = new System.Collections.Generic.List <ShoppingCartInfo>();
                if (int.TryParse(this.Page.Request.QueryString["buyAmount"], out this.buyAmount) && !string.IsNullOrEmpty(this.Page.Request.QueryString["productSku"]) && !string.IsNullOrEmpty(this.Page.Request.QueryString["from"]) && (this.Page.Request.QueryString["from"] == "signBuy" || this.Page.Request.QueryString["from"] == "groupBuy"))
                {
                    this.productSku = this.Page.Request.QueryString["productSku"];
                    if (this.isbargain)
                    {
                        int bargainDetialId = Globals.RequestQueryNum("bargainDetialId");
                        list = ShoppingCartProcessor.GetListShoppingCart(this.productSku, this.buyAmount, bargainDetialId, 0);
                    }
                    else
                    {
                        int num  = this.buyAmount;
                        int num2 = Globals.RequestQueryNum("limitedTimeDiscountId");
                        if (num2 > 0)
                        {
                            bool flag = true;
                            LimitedTimeDiscountInfo discountInfo = LimitedTimeDiscountHelper.GetDiscountInfo(num2);
                            if (discountInfo == null)
                            {
                                flag = false;
                            }
                            if (flag)
                            {
                                if (MemberHelper.CheckCurrentMemberIsInRange(discountInfo.ApplyMembers, discountInfo.DefualtGroup, discountInfo.CustomGroup, this.CurrentMemberInfo.UserId))
                                {
                                    if (discountInfo.LimitNumber != 0)
                                    {
                                        int limitedTimeDiscountUsedNum = ShoppingCartProcessor.GetLimitedTimeDiscountUsedNum(num2, this.productSku, 0, this.CurrentMemberInfo.UserId, false);
                                        if (this.buyAmount > discountInfo.LimitNumber - limitedTimeDiscountUsedNum)
                                        {
                                            num = discountInfo.LimitNumber - limitedTimeDiscountUsedNum;
                                        }
                                    }
                                }
                                else
                                {
                                    num2 = 0;
                                }
                            }
                            else
                            {
                                num2 = 0;
                            }
                        }
                        if (num2 > 0)
                        {
                            ShoppingCartProcessor.RemoveLineItem(this.productSku, 0, num2);
                        }
                        if (num == 0 && num2 > 0)
                        {
                            num  = this.buyAmount;
                            num2 = 0;
                        }
                        list = ShoppingCartProcessor.GetListShoppingCart(this.productSku, num, 0, num2);
                    }
                }
                else
                {
                    list = ShoppingCartProcessor.GetOrderSummitCart();
                }
                if (list == null)
                {
                    System.Web.HttpContext.Current.Response.Write("<script>alert('商品已下架或没有需要结算的订单!');location.href='/Vshop/ShoppingCart.aspx'</script>");
                }
                else
                {
                    if (list.Count > 1)
                    {
                        this.litShowMes.Text = "<div style=\"color: #F60; \"><img  src=\"/Utility/pics/u77.png\">您所购买的商品不支持同一个物流规则发货,系统自动拆分成多个子订单处理</div>";
                    }
                    this.rptCartProducts.DataSource = list;
                    this.rptCartProducts.DataBind();
                    decimal d    = 0m;
                    decimal num3 = 0m;
                    decimal d2   = 0m;
                    int     num4 = 0;
                    foreach (ShoppingCartInfo current in list)
                    {
                        num4 += current.GetPointNumber;
                        d    += current.Total;
                        num3 += current.Exemption;
                        d2   += current.ShipCost;
                    }
                    decimal d3 = num3;
                    this.litOrderTotal.Text = (d - d3).ToString("F2");
                    if (num4 == 0)
                    {
                        this.litDisplayPointNumber.Text = "style=\"display:none;\"";
                    }
                    this.litPointNumber.Text = num4.ToString();
                    PageTitle.AddSiteNameTitle("订单确认");
                }
            }
        }