示例#1
0
        protected override void AttachChildControls()
        {
            this.orderId           = this.Page.Request.QueryString["orderId"];
            this.litShipTo         = (Literal)this.FindControl("litShipTo");
            this.litPhone          = (Literal)this.FindControl("litPhone");
            this.litAddress        = (Literal)this.FindControl("litAddress");
            this.litOrderId        = (Literal)this.FindControl("litOrderId");
            this.litOrderDate      = (Literal)this.FindControl("litOrderDate");
            this.litOrderStatus    = (OrderStatusLabel)this.FindControl("litOrderStatus");
            this.rptOrderProducts  = (VshopTemplatedRepeater)this.FindControl("rptOrderProducts");
            this.litTotalPrice     = (Literal)this.FindControl("litTotalPrice");
            this.litPayTime        = (Literal)this.FindControl("litPayTime");
            this.hlinkGetRedPager  = (HyperLink)this.FindControl("hlinkGetRedPager");
            this.orderStatus       = (HtmlInputHidden)this.FindControl("orderStatus");
            this.txtOrderId        = (HtmlInputHidden)this.FindControl("txtOrderId");
            this.litRemark         = (Literal)this.FindControl("litRemark");
            this.litShipToDate     = (Literal)this.FindControl("litShipToDate");
            this.litShippingCost   = (Literal)this.FindControl("litShippingCost");
            this.litCounponPrice   = (Literal)this.FindControl("litCounponPrice");
            this.litRedPagerAmount = (Literal)this.FindControl("litRedPagerAmount");
            this.litExemption      = (Literal)this.FindControl("litExemption");
            this.litBuildPrice     = (Literal)this.FindControl("litBuildPrice");
            this.litDisCountPrice  = (Literal)this.FindControl("litDisCountPrice");
            this.litActualPrice    = (Literal)this.FindControl("litActualPrice");
            OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(this.orderId);

            if (orderInfo == null)
            {
                base.GotoResourceNotFound("此订单已不存在");
            }
            this.litShipTo.Text    = orderInfo.ShipTo;
            this.litPhone.Text     = orderInfo.CellPhone;
            this.litAddress.Text   = orderInfo.ShippingRegion + orderInfo.Address;
            this.litOrderId.Text   = this.orderId;
            this.litOrderDate.Text = orderInfo.OrderDate.ToString();
            this.litTotalPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
            this.litOrderStatus.OrderStatusCode = orderInfo.OrderStatus;
            this.litPayTime.SetWhenIsNotNull(orderInfo.PayDate.HasValue ? orderInfo.PayDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "");
            OrderRedPagerInfo orderRedPagerInfo = OrderRedPagerBrower.GetOrderRedPagerInfo(this.orderId);

            if ((orderRedPagerInfo != null) && (orderRedPagerInfo.MaxGetTimes > orderRedPagerInfo.AlreadyGetTimes))
            {
                this.hlinkGetRedPager.NavigateUrl = "/vshop/GetRedShare.aspx?orderid=" + this.orderId;
                this.hlinkGetRedPager.Visible     = true;
            }
            this.orderStatus.SetWhenIsNotNull(((int)orderInfo.OrderStatus).ToString());
            this.txtOrderId.SetWhenIsNotNull(this.orderId.ToString());
            this.litCounponPrice.SetWhenIsNotNull(orderInfo.CouponValue.ToString("F2"));
            this.litRedPagerAmount.SetWhenIsNotNull(orderInfo.RedPagerAmount.ToString("F2"));
            this.litShippingCost.SetWhenIsNotNull(orderInfo.AdjustedFreight.ToString("F2"));
            this.litShipToDate.SetWhenIsNotNull(orderInfo.ShipToDate);
            this.litBuildPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
            this.litDisCountPrice.SetWhenIsNotNull(orderInfo.GetAdjustCommssion().ToString("F2"));
            this.litActualPrice.SetWhenIsNotNull(orderInfo.TotalPrice.ToString("F2"));
            this.litRemark.SetWhenIsNotNull(orderInfo.Remark);
            this.litExemption.SetWhenIsNotNull(orderInfo.DiscountAmount.ToString("F2"));
            this.rptOrderProducts.DataSource = orderInfo.LineItems.Values;
            this.rptOrderProducts.DataBind();
            PageTitle.AddSiteNameTitle("订单详情");
        }
示例#2
0
        protected override void AttachChildControls()
        {
            this.orderId              = this.Page.Request.QueryString["orderId"];
            this.litShipTo            = (Literal)this.FindControl("litShipTo");
            this.litPhone             = (Literal)this.FindControl("litPhone");
            this.litAddress           = (Literal)this.FindControl("litAddress");
            this.litOrderId           = (Literal)this.FindControl("litOrderId");
            this.litOrderDate         = (Literal)this.FindControl("litOrderDate");
            this.litOrderStatus       = (OrderStatusLabel)this.FindControl("litOrderStatus");
            this.DistributionInfoList = (HtmlControl)this.FindControl("DistributionInfoList");        //配送信息区域
            this.snCodeArea           = (HtmlControl)this.FindControl("snCodeArea");                  //sn码展示区域
            this.litSnCode            = (Image)this.FindControl("litSnCode");                         //sn码展示
            this.rptOrderProducts     = (VshopTemplatedRepeater)this.FindControl("rptOrderProducts"); //商品列表
            this.rptOrderGifts        = (VshopTemplatedRepeater)this.FindControl("rptOrderGifts");    //礼品列表
            this.itemList             = (HtmlControl)this.FindControl("itemList");                    //商品列表区域
            this.giftList             = (HtmlControl)this.FindControl("giftList");                    //礼品列表区域
            this.costPointArea        = (HtmlControl)this.FindControl("costPoint");                   //所需积分区域
            this.litPoint             = (Literal)this.FindControl("litPoint");                        //所需积分
            this.litTotalPrice        = (Literal)this.FindControl("litTotalPrice");                   //所需金钱
            this.litPayTime           = (Literal)this.FindControl("litPayTime");
            this.hlinkGetRedPager     = (HyperLink)this.FindControl("hlinkGetRedPager");
            this.orderStatus          = (HtmlInputHidden)this.FindControl("orderStatus");
            this.txtOrderId           = (HtmlInputHidden)this.FindControl("txtOrderId");
            this.litRemark            = (Literal)this.FindControl("litRemark");
            this.litShipToDate        = (Literal)this.FindControl("litShipToDate");
            this.litShippingCost      = (Literal)this.FindControl("litShippingCost");
            this.litCounponPrice      = (Literal)this.FindControl("litCounponPrice");
            this.litRedPagerAmount    = (Literal)this.FindControl("litRedPagerAmount");
            this.litExemption         = (Literal)this.FindControl("litExemption");
            this.litBuildPrice        = (Literal)this.FindControl("litBuildPrice");
            this.litDisCountPrice     = (Literal)this.FindControl("litDisCountPrice");
            this.litActualPrice       = (Literal)this.FindControl("litActualPrice");
            OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(this.orderId);
            //礼品订单数据获取
            DataTable orderGiftInfo = GiftProcessor.GetOrderGiftsThumbnailsUrl(this.orderId);

            if (orderInfo == null && orderGiftInfo == null)
            {
                base.GotoResourceNotFound("此订单已不存在");
            }
            this.litShipTo.Text    = orderInfo.ShipTo;
            this.litPhone.Text     = orderInfo.CellPhone;
            this.litAddress.Text   = orderInfo.ShippingRegion + orderInfo.Address;
            this.litOrderId.Text   = this.orderId;
            this.litOrderDate.Text = orderInfo.OrderDate.ToString();
            this.litTotalPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
            this.litOrderStatus.OrderStatusCode = orderInfo.OrderStatus;
            this.litPayTime.SetWhenIsNotNull(orderInfo.PayDate.HasValue ? orderInfo.PayDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "");
            OrderRedPagerInfo orderRedPagerInfo = OrderRedPagerBrower.GetOrderRedPagerInfo(this.orderId);

            if ((orderRedPagerInfo != null) && (orderRedPagerInfo.MaxGetTimes > orderRedPagerInfo.AlreadyGetTimes))
            {
                this.hlinkGetRedPager.NavigateUrl = "/vshop/GetRedShare.aspx?orderid=" + this.orderId;
                this.hlinkGetRedPager.Visible     = true;
            }
            this.orderStatus.SetWhenIsNotNull(((int)orderInfo.OrderStatus).ToString());
            this.txtOrderId.SetWhenIsNotNull(this.orderId.ToString());
            this.litCounponPrice.SetWhenIsNotNull(orderInfo.CouponValue.ToString("F2"));
            this.litRedPagerAmount.SetWhenIsNotNull(orderInfo.CouponValue.ToString("F2"));
            this.litShippingCost.SetWhenIsNotNull(orderInfo.AdjustedFreight.ToString("F2"));
            this.litShipToDate.SetWhenIsNotNull(orderInfo.ShipToDate);
            this.litBuildPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
            this.litDisCountPrice.SetWhenIsNotNull(orderInfo.GetAdjustCommssion().ToString("F2"));
            this.litActualPrice.SetWhenIsNotNull(orderInfo.TotalPrice.ToString("F2"));
            this.litRemark.SetWhenIsNotNull(orderInfo.Remark);
            this.litExemption.SetWhenIsNotNull(orderInfo.DiscountAmount.ToString("F2"));
            //绑定礼品列表数据源
            this.rptOrderGifts.DataSource = orderGiftInfo;
            this.rptOrderGifts.DataBind();
            this.rptOrderProducts.DataSource = orderInfo.LineItems.Values;
            this.rptOrderProducts.DataBind();
            PageTitle.AddSiteNameTitle("订单详情");
            //显示消耗掉的总积分
            int costPoint = 0;

            for (int i = 0; i < orderGiftInfo.Rows.Count; i++)
            {
                costPoint += Convert.ToInt32(orderGiftInfo.Rows[i]["costPoint"]);
            }
            this.litPoint.Text = costPoint.ToString();

            //隐藏判断
            if (orderGiftInfo.Rows.Count == 0)
            {
                giftList.Visible      = false;
                costPointArea.Visible = false;
            }
            if (orderInfo.LineItems.Count == 0)
            {
                itemList.Visible = false;
            }
            SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);

            if (masterSettings.EnableQuickPay && this.orderId.Length == 15)//如果打开了快速收银,那么隐藏物流配送板块,显示sn码板块并且载入sn码
            {
                DistributionInfoList.Visible = false;
                snCodeArea.Visible           = true;
                this.litSnCode.ImageUrl      = "Img.aspx?type=snCode&id=" + this.orderId;
                this.litSnCode.DataBind();
            }
            else
            {
                DistributionInfoList.Visible = true;
                snCodeArea.Visible           = false;
            }
        }
示例#3
0
        protected override void AttachChildControls()
        {
            this.orderId           = this.Page.Request.QueryString["orderId"];
            this.litShipTo         = (System.Web.UI.WebControls.Literal) this.FindControl("litShipTo");
            this.litPhone          = (System.Web.UI.WebControls.Literal) this.FindControl("litPhone");
            this.litAddress        = (System.Web.UI.WebControls.Literal) this.FindControl("litAddress");
            this.litOrderId        = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderId");
            this.litAddPayInfo     = (System.Web.UI.WebControls.Literal) this.FindControl("litAddPayInfo");
            this.litOrderDate      = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderDate");
            this.litOrderStatus    = (OrderStatusLabel)this.FindControl("litOrderStatus");
            this.rptOrderProducts  = (VshopTemplatedRepeater)this.FindControl("rptOrderProducts");
            this.litTotalPrice     = (System.Web.UI.WebControls.Literal) this.FindControl("litTotalPrice");
            this.litPayTime        = (System.Web.UI.WebControls.Literal) this.FindControl("litPayTime");
            this.hlinkGetRedPager  = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkGetRedPager");
            this.orderStatus       = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("orderStatus");
            this.txtOrderId        = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtOrderId");
            this.litRemark         = (System.Web.UI.WebControls.Literal) this.FindControl("litRemark");
            this.litShipToDate     = (System.Web.UI.WebControls.Literal) this.FindControl("litShipToDate");
            this.litShippingCost   = (System.Web.UI.WebControls.Literal) this.FindControl("litShippingCost");
            this.litCounponPrice   = (System.Web.UI.WebControls.Literal) this.FindControl("litCounponPrice");
            this.litRedPagerAmount = (System.Web.UI.WebControls.Literal) this.FindControl("litRedPagerAmount");
            this.litExemption      = (System.Web.UI.WebControls.Literal) this.FindControl("litExemption");
            this.litPointToCash    = (System.Web.UI.WebControls.Literal) this.FindControl("litPointToCash");
            this.litBuildPrice     = (System.Web.UI.WebControls.Literal) this.FindControl("litBuildPrice");
            this.litDisCountPrice  = (System.Web.UI.WebControls.Literal) this.FindControl("litDisCountPrice");
            this.litActualPrice    = (System.Web.UI.WebControls.Literal) this.FindControl("litActualPrice");
            OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(this.orderId);

            if (orderInfo == null)
            {
                base.GotoResourceNotFound("此订单已不存在");
            }
            this.litShipTo.Text  = orderInfo.ShipTo;
            this.litPhone.Text   = orderInfo.CellPhone;
            this.litAddress.Text = orderInfo.ShippingRegion + orderInfo.Address;
            if (orderInfo.BargainDetialId > 0)
            {
                this.litOrderId.Text = this.orderId + "<span class='text-danger'> 【砍价】</span>";
            }
            else
            {
                this.litOrderId.Text = this.orderId;
            }
            this.litOrderDate.Text = orderInfo.OrderDate.ToString("yyyy-MM-dd HH:mm:ss");
            this.litTotalPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
            this.litOrderStatus.OrderStatusCode = orderInfo.OrderStatus;
            this.litOrderStatus.Gateway         = orderInfo.Gateway;
            this.litPayTime.SetWhenIsNotNull(orderInfo.PayDate.HasValue ? orderInfo.PayDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "");
            OrderRedPagerInfo orderRedPagerInfo = OrderRedPagerBrower.GetOrderRedPagerInfo(this.orderId);

            if (orderRedPagerInfo != null && orderRedPagerInfo.MaxGetTimes > orderRedPagerInfo.AlreadyGetTimes)
            {
                this.hlinkGetRedPager.NavigateUrl = "/vshop/GetRedShare.aspx?orderid=" + this.orderId;
                this.hlinkGetRedPager.Visible     = true;
            }
            this.orderStatus.SetWhenIsNotNull(((int)orderInfo.OrderStatus).ToString());
            this.txtOrderId.SetWhenIsNotNull(this.orderId.ToString());
            decimal d = orderInfo.CouponValue;

            if (d > 0m)
            {
                this.litCounponPrice.Text = "-¥" + d.ToString("F2");
            }
            else
            {
                this.litCounponPrice.Text = " ¥" + d.ToString("F2").Trim(new char[]
                {
                    '-'
                });
            }
            d = orderInfo.RedPagerAmount;
            if (d > 0m)
            {
                this.litRedPagerAmount.Text = "<div><span class=\"span-r-80\">代金券抵扣:</span>- ¥" + d.ToString("F2") + "</div>";
            }
            d = orderInfo.GetAdjustCommssion();
            if (d > 0m)
            {
                this.litDisCountPrice.Text = "<div><span class=\"span-r-80\">价格调整:</span>- ¥" + d.ToString("F2") + "</div>";
            }
            else
            {
                this.litDisCountPrice.Text = "<div><span class=\"span-r-80\">价格调整:</span> &nbsp;¥" + d.ToString("F2").Trim(new char[]
                {
                    '-'
                }) + "</div>";
            }
            d = orderInfo.PointToCash;
            if (d > 0m)
            {
                this.litPointToCash.Text = "<div><span class=\"span-r-80\">积分抵现:</span>- ¥" + d.ToString("F2") + "</div>";
            }
            d = orderInfo.DiscountAmount;
            if (d > 0m)
            {
                this.litExemption.Text = "<div><span class=\"span-r-80\">优惠减免:</span>- ¥" + d.ToString("F2") + "</div>";
            }
            this.litShippingCost.Text = orderInfo.AdjustedFreight.ToString("F2");
            this.litShipToDate.SetWhenIsNotNull(orderInfo.ShipToDate);
            this.litBuildPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
            decimal total = orderInfo.GetTotal();

            this.litActualPrice.SetWhenIsNotNull(total.ToString("F2"));
            this.litRemark.SetWhenIsNotNull(orderInfo.Remark);
            this.rptOrderProducts.DataSource = orderInfo.LineItems.Values;
            this.rptOrderProducts.DataBind();
            System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
            decimal d2 = orderInfo.GetTotal() - orderInfo.BalancePayMoneyTotal;

            if (orderInfo.BalancePayMoneyTotal > 0m)
            {
                if (orderInfo.PayDate.HasValue)
                {
                    stringBuilder.Append("<hr /><div><span class='span-r-80'>余额支付:</span>&nbsp;&nbsp;<strong class='text-danger'>¥" + orderInfo.BalancePayMoneyTotal.ToString("F2") + "</strong></div>");
                    if (d2 - orderInfo.CouponFreightMoneyTotal > 0m)
                    {
                        stringBuilder.Append(string.Concat(new string[]
                        {
                            "<div><span class='span-r-80'>",
                            orderInfo.PaymentType,
                            ":</span>&nbsp;&nbsp;<strong class='text-danger'>¥",
                            d2.ToString("F2"),
                            "</strong></div>"
                        }));
                    }
                }
                else
                {
                    decimal cashPayMoney = orderInfo.GetCashPayMoney();
                    stringBuilder.Append("<hr /><div><span class='span-r-80'>余额已支付:</span>- ¥" + orderInfo.BalancePayMoneyTotal.ToString("F2") + "</div>");
                    stringBuilder.Append("<div><span class='span-r-80'>还需支付:</span>&nbsp;<strong class='text-danger'> ¥" + cashPayMoney.ToString("F2") + "</strong></div>");
                }
                this.litAddPayInfo.Text = stringBuilder.ToString();
            }
            PageTitle.AddSiteNameTitle("订单详情");
        }
        protected override void AttachChildControls()
        {
            this.orderId           = this.Page.Request.QueryString["orderId"];
            this.litShipTo         = (Literal)this.FindControl("litShipTo");
            this.litPhone          = (Literal)this.FindControl("litPhone");
            this.litAddress        = (Literal)this.FindControl("litAddress");
            this.litOrderId        = (Literal)this.FindControl("litOrderId");
            this.litOrderDate      = (Literal)this.FindControl("litOrderDate");
            this.litOrderStatus    = (OrderStatusLabel)this.FindControl("litOrderStatus");
            this.rptOrderProducts  = (VshopTemplatedRepeater)this.FindControl("rptOrderProducts");
            this.litTotalPrice     = (Literal)this.FindControl("litTotalPrice");
            this.litPayTime        = (Literal)this.FindControl("litPayTime");
            this.hlinkGetRedPager  = (HyperLink)this.FindControl("hlinkGetRedPager");
            this.orderStatus       = (HtmlInputHidden)this.FindControl("orderStatus");
            this.txtOrderId        = (HtmlInputHidden)this.FindControl("txtOrderId");
            this.litRemark         = (Literal)this.FindControl("litRemark");
            this.litShipToDate     = (Literal)this.FindControl("litShipToDate");
            this.litShippingCost   = (Literal)this.FindControl("litShippingCost");
            this.litCounponPrice   = (Literal)this.FindControl("litCounponPrice");
            this.litRedPagerAmount = (Literal)this.FindControl("litRedPagerAmount");
            this.litExemption      = (Literal)this.FindControl("litExemption");
            this.litPointToCash    = (Literal)this.FindControl("litPointToCash");
            this.litBuildPrice     = (Literal)this.FindControl("litBuildPrice");
            this.litDisCountPrice  = (Literal)this.FindControl("litDisCountPrice");
            this.litActualPrice    = (Literal)this.FindControl("litActualPrice");
            OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(this.orderId);

            if (orderInfo == null)
            {
                base.GotoResourceNotFound("此订单已不存在");
            }
            this.litShipTo.Text  = orderInfo.ShipTo;
            this.litPhone.Text   = orderInfo.CellPhone;
            this.litAddress.Text = orderInfo.ShippingRegion + orderInfo.Address;
            if (orderInfo.BargainDetialId > 0)
            {
                this.litOrderId.Text = this.orderId + "<span class='text-danger'> 【砍价】</span>";
            }
            else
            {
                this.litOrderId.Text = this.orderId;
            }
            this.litOrderDate.Text = orderInfo.OrderDate.ToString();
            this.litTotalPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
            this.litOrderStatus.OrderStatusCode = orderInfo.OrderStatus;
            this.litOrderStatus.Gateway         = orderInfo.Gateway;
            this.litPayTime.SetWhenIsNotNull(orderInfo.PayDate.HasValue ? orderInfo.PayDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "");
            OrderRedPagerInfo orderRedPagerInfo = OrderRedPagerBrower.GetOrderRedPagerInfo(this.orderId);

            if ((orderRedPagerInfo != null) && (orderRedPagerInfo.MaxGetTimes > orderRedPagerInfo.AlreadyGetTimes))
            {
                this.hlinkGetRedPager.NavigateUrl = "/vshop/GetRedShare.aspx?orderid=" + this.orderId;
                this.hlinkGetRedPager.Visible     = true;
            }
            this.orderStatus.SetWhenIsNotNull(((int)orderInfo.OrderStatus).ToString());
            this.txtOrderId.SetWhenIsNotNull(this.orderId.ToString());
            decimal couponValue = 0M;

            couponValue = orderInfo.CouponValue;
            if (couponValue > 0M)
            {
                this.litCounponPrice.Text = "-\x00a5" + couponValue.ToString("F2");
            }
            else
            {
                this.litCounponPrice.Text = " \x00a5" + couponValue.ToString("F2").Trim(new char[] { '-' });
            }
            couponValue = orderInfo.RedPagerAmount;
            if (couponValue > 0M)
            {
                this.litRedPagerAmount.Text = "<div><span class=\"span-r-80\">代金券抵扣:</span>- \x00a5" + couponValue.ToString("F2") + "</div>";
            }
            couponValue = orderInfo.GetAdjustCommssion();
            if (couponValue > 0M)
            {
                this.litDisCountPrice.Text = "<div><span class=\"span-r-80\">价格调整:</span>- \x00a5" + couponValue.ToString("F2") + "</div>";
            }
            else
            {
                this.litDisCountPrice.Text = "<div><span class=\"span-r-80\">价格调整:</span> &nbsp;\x00a5" + couponValue.ToString("F2").Trim(new char[] { '-' }) + "</div>";
            }
            couponValue = orderInfo.PointToCash;
            if (couponValue > 0M)
            {
                this.litPointToCash.Text = "<div><span class=\"span-r-80\">积分抵现:</span>- \x00a5" + couponValue.ToString("F2") + "</div>";
            }
            couponValue = orderInfo.DiscountAmount;
            if (couponValue > 0M)
            {
                this.litExemption.Text = "<div><span class=\"span-r-80\">优惠减免:</span>- \x00a5" + couponValue.ToString("F2") + "</div>";
            }
            this.litShippingCost.Text = orderInfo.AdjustedFreight.ToString("F2");
            this.litShipToDate.SetWhenIsNotNull(orderInfo.ShipToDate);
            this.litBuildPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
            this.litActualPrice.SetWhenIsNotNull(orderInfo.TotalPrice.ToString("F2"));
            this.litRemark.SetWhenIsNotNull(orderInfo.Remark);
            this.rptOrderProducts.DataSource = orderInfo.LineItems.Values;
            this.rptOrderProducts.DataBind();
            PageTitle.AddSiteNameTitle("订单详情");
        }
示例#5
0
        protected override void AttachChildControls()
        {
            string s    = HttpContext.Current.Request.QueryString.Get("m");
            string str2 = HttpContext.Current.Request.QueryString.Get("type");

            this.ltGetTotal                      = (Literal)this.FindControl("ltGetTotal");
            this.ltOrderAmountCanUse             = (Literal)this.FindControl("ltOrderAmountCanUse");
            this.ltExpiryTime                    = (Literal)this.FindControl("ltExpiryTime");
            this.ltRedPagerActivityName          = (Literal)this.FindControl("ltRedPagerActivityName");
            this.ltRedPagerActivityNameForOrders = (Literal)this.FindControl("ltRedPagerActivityNameForOrders");
            this.divNoLogin                      = (Panel)this.FindControl("divNoLogin");
            this.divNoNum   = (Panel)this.FindControl("divNoNum");
            this.divSuccess = (Panel)this.FindControl("divSuccess");
            this.hlinkLogin = (HyperLink)this.FindControl("hlinkLogin");
            switch (str2)
            {
            case "1":
            case "5":
            {
                int result = 0;
                int.TryParse(s, out result);
                if (result > 0)
                {
                    string           orderid = HttpContext.Current.Request.QueryString.Get("orderid");
                    UserRedPagerInfo userRedPagerByOrderIDAndUserID = UserRedPagerBrower.GetUserRedPagerByOrderIDAndUserID(result, orderid);
                    if (userRedPagerByOrderIDAndUserID != null)
                    {
                        this.ltGetTotal.Text          = userRedPagerByOrderIDAndUserID.Amount.ToString().Split(new char[] { '.' })[0];
                        this.ltOrderAmountCanUse.Text = userRedPagerByOrderIDAndUserID.OrderAmountCanUse.ToString("F2").Replace(".00", "");
                        this.ltExpiryTime.Text        = userRedPagerByOrderIDAndUserID.ExpiryTime.ToString("yyyy-M-d");
                        if (str2 == "5")
                        {
                            this.ltRedPagerActivityName.Text = "该券已经到你的钱包了</div><div class='get-red-explain'><a href='/Vshop/myredpager.aspx'>点击查看</a>";
                        }
                        else
                        {
                            this.ltRedPagerActivityName.Text = userRedPagerByOrderIDAndUserID.RedPagerActivityName ?? "";
                        }
                        this.divSuccess.Visible = true;
                    }
                }
                PageTitle.AddSiteNameTitle("成功获取代金券");
                return;
            }

            default:
            {
                string str6 = str2;
                if (str6 != null)
                {
                    if (!(str6 == "-1"))
                    {
                        if ((str6 == "-2") || (str6 == "-4"))
                        {
                            this.divNoLogin.Visible = true;
                            break;
                        }
                        if (str6 == "-3")
                        {
                            this.divNoNum.Visible = true;
                            break;
                        }
                    }
                    else
                    {
                        string            str4 = HttpContext.Current.Request.QueryString.Get("orderid");
                        OrderRedPagerInfo orderRedPagerInfo = OrderRedPagerBrower.GetOrderRedPagerInfo(str4);
                        if (orderRedPagerInfo != null)
                        {
                            this.ltRedPagerActivityNameForOrders.Text = orderRedPagerInfo.RedPagerActivityName;
                            string str5 = "http://" + Globals.DomainName + Globals.ApplicationPath + "/Vshop/GetRedPager.aspx?orderid=" + str4;
                            this.hlinkLogin.NavigateUrl = "/Vshop/UserLogin.aspx?returnUrl=" + HttpContext.Current.Server.UrlEncode(str5 + "&" + this.getopenid());
                            this.divNoLogin.Visible     = true;
                        }
                        else
                        {
                            HttpContext.Current.Response.Redirect("/Vshop/");
                            HttpContext.Current.Response.End();
                        }
                    }
                }
                break;
            }
            }
            PageTitle.AddSiteNameTitle("获取代金券");
        }