Esempio n. 1
0
 protected override void AttachChildControls()
 {
     if (string.IsNullOrEmpty(this.Page.Request.QueryString["orderId"]))
     {
         base.GotoResourceNotFound();
     }
     this.orderId         = this.Page.Request.QueryString["orderId"];
     this.orderItems      = (Common_OrderManage_ReviewsOrderItems)this.FindControl("Common_OrderManage_ReviewsOrderItems");
     this.litWeight       = (System.Web.UI.WebControls.Literal) this.FindControl("litWeight");
     this.litOrderId      = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderId");
     this.lbltotalPrice   = (FormatedMoneyLabel)this.FindControl("lbltotalPrice");
     this.litAddDate      = (FormatedTimeLabel)this.FindControl("litAddDate");
     this.lblOrderStatus  = (OrderStatusLabel)this.FindControl("lblOrderStatus");
     this.litCloseReason  = (System.Web.UI.WebControls.Literal) this.FindControl("litCloseReason");
     this.btnRefer        = ButtonManager.Create(this.FindControl("btnRefer"));
     this.btnRefer.Click += new System.EventHandler(this.btnRefer_Click);
     if (!this.Page.IsPostBack && HiContext.Current.User.UserRole == UserRole.Member)
     {
         this.btnRefer.Text = "提交评论";
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         if (orderInfo.OrderStatus != OrderStatus.Finished)
         {
             this.ShowMessage("订单还未完成,不能进行评价", false);
             this.btnRefer.Visible = false;
         }
         this.BindOrderItems(orderInfo);
         this.BindOrderBase(orderInfo);
     }
 }
Esempio n. 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.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("订单详情");
        }
        void ReleaseDesignerOutlets()
        {
            if (ArrowImageView != null)
            {
                ArrowImageView.Dispose();
                ArrowImageView = null;
            }

            if (ItemsLabel != null)
            {
                ItemsLabel.Dispose();
                ItemsLabel = null;
            }

            if (ItemsView != null)
            {
                ItemsView.Dispose();
                ItemsView = null;
            }

            if (NumberLabel != null)
            {
                NumberLabel.Dispose();
                NumberLabel = null;
            }

            if (OrderImageView != null)
            {
                OrderImageView.Dispose();
                OrderImageView = null;
            }

            if (OrderStatusLabel != null)
            {
                OrderStatusLabel.Dispose();
                OrderStatusLabel = null;
            }

            if (PaymentStatusLabel != null)
            {
                PaymentStatusLabel.Dispose();
                PaymentStatusLabel = null;
            }

            if (PaymentStatusView != null)
            {
                PaymentStatusView.Dispose();
                PaymentStatusView = null;
            }

            if (PriceLabel != null)
            {
                PriceLabel.Dispose();
                PriceLabel = null;
            }
        }
Esempio n. 4
0
 protected override void AttachChildControls()
 {
     this.orderId             = this.Page.Request.QueryString["orderId"];
     this.litOrderId          = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderId");
     this.lbltotalPrice       = (FormatedMoneyLabel)this.FindControl("lbltotalPrice");
     this.litAddDate          = (FormatedTimeLabel)this.FindControl("litAddDate");
     this.lblOrderStatus      = (OrderStatusLabel)this.FindControl("lblOrderStatus");
     this.litCloseReason      = (System.Web.UI.WebControls.Literal) this.FindControl("litCloseReason");
     this.litRemark           = (System.Web.UI.WebControls.Literal) this.FindControl("litRemark");
     this.litShipTo           = (System.Web.UI.WebControls.Literal) this.FindControl("litShipTo");
     this.litRegion           = (System.Web.UI.WebControls.Literal) this.FindControl("litRegion");
     this.litAddress          = (System.Web.UI.WebControls.Literal) this.FindControl("litAddress");
     this.litZipcode          = (System.Web.UI.WebControls.Literal) this.FindControl("litZipcode");
     this.litEmail            = (System.Web.UI.WebControls.Literal) this.FindControl("litEmail");
     this.litPhone            = (System.Web.UI.WebControls.Literal) this.FindControl("litPhone");
     this.litTellPhone        = (System.Web.UI.WebControls.Literal) this.FindControl("litTellPhone");
     this.litShipToDate       = (System.Web.UI.WebControls.Literal) this.FindControl("litShipToDate");
     this.litPaymentType      = (System.Web.UI.WebControls.Literal) this.FindControl("litPaymentType");
     this.litModeName         = (System.Web.UI.WebControls.Literal) this.FindControl("litModeName");
     this.plOrderSended       = (System.Web.UI.WebControls.Panel) this.FindControl("plOrderSended");
     this.litRealModeName     = (System.Web.UI.WebControls.Literal) this.FindControl("litRealModeName");
     this.litShippNumber      = (System.Web.UI.WebControls.Literal) this.FindControl("litShippNumber");
     this.litDiscountName     = (System.Web.UI.WebControls.HyperLink) this.FindControl("litDiscountName");
     this.lblAdjustedDiscount = (FormatedMoneyLabel)this.FindControl("lblAdjustedDiscount");
     this.litFreeName         = (System.Web.UI.WebControls.HyperLink) this.FindControl("litFreeName");
     this.plExpress           = (System.Web.UI.WebControls.Panel) this.FindControl("plExpress");
     this.power                      = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("power");
     this.orderItems                 = (Common_OrderManage_OrderItems)this.FindControl("Common_OrderManage_OrderItems");
     this.grdOrderGift               = (System.Web.UI.WebControls.GridView) this.FindControl("grdOrderGift");
     this.plOrderGift                = (System.Web.UI.WebControls.Panel) this.FindControl("plOrderGift");
     this.lblBundlingPrice           = (System.Web.UI.WebControls.Literal) this.FindControl("lblBundlingPrice");
     this.litPoints                  = (System.Web.UI.WebControls.Literal) this.FindControl("litPoints");
     this.litSentTimesPointPromotion = (System.Web.UI.WebControls.HyperLink) this.FindControl("litSentTimesPointPromotion");
     this.litWeight                  = (System.Web.UI.WebControls.Literal) this.FindControl("litWeight");
     this.litFree                    = (System.Web.UI.WebControls.Literal) this.FindControl("litFree");
     this.lblFreight                 = (FormatedMoneyLabel)this.FindControl("lblFreight");
     this.lblPayCharge               = (FormatedMoneyLabel)this.FindControl("lblPayCharge");
     this.litCouponValue             = (System.Web.UI.WebControls.Literal) this.FindControl("litCouponValue");
     this.lblDiscount                = (FormatedMoneyLabel)this.FindControl("lblDiscount");
     this.litTotalPrice              = (FormatedMoneyLabel)this.FindControl("litTotalPrice");
     this.lblRefundTotal             = (FormatedMoneyLabel)this.FindControl("lblRefundTotal");
     this.litAddOrderDate            = (FormatedTimeLabel)this.FindControl("litAddOrderDate");
     this.litPayDate                 = (FormatedTimeLabel)this.FindControl("litPayDate");
     this.litPayBack                 = (FormatedTimeLabel)this.FindControl("litPayBack");
     this.litBackShip                = (FormatedTimeLabel)this.FindControl("litBackShip");
     this.litShipDate                = (FormatedTimeLabel)this.FindControl("litShipDate");
     this.litResultDate              = (FormatedTimeLabel)this.FindControl("litResultDate");
     this.lkbtnConfirmOrder          = (System.Web.UI.WebControls.LinkButton) this.FindControl("lkbtnConfirmOrder");
     this.lkbtnCloseOrder            = (System.Web.UI.WebControls.LinkButton) this.FindControl("lkbtnCloseOrder");
     this.lkbtnApplyForRefund        = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("lkbtnApplyForRefund");
     this.lkbtnApplyForReturn        = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("lkbtnApplyForReturn");
     this.lkbtnApplyForReplace       = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("lkbtnApplyForReplace");
     this.btnOk                      = (System.Web.UI.WebControls.Button) this.FindControl("btnOk");
     this.btnReplace                 = (System.Web.UI.WebControls.Button) this.FindControl("btnReplace");
     this.btnReturn                  = (System.Web.UI.WebControls.Button) this.FindControl("btnReturn");
     this.btnPay                     = (System.Web.UI.WebControls.Button) this.FindControl("btnPay");
     this.lbRefundMoney              = (System.Web.UI.WebControls.Label) this.FindControl("lbRefundMoney");
     this.lbRefundMoney              = (System.Web.UI.WebControls.Label) this.FindControl("lbRefundMoney");
     this.lbCloseReason              = (System.Web.UI.WebControls.Label) this.FindControl("lbCloseReason");
     this.txtRemark                  = (System.Web.UI.WebControls.TextBox) this.FindControl("txtRemark");
     this.txtReturnRemark            = (System.Web.UI.WebControls.TextBox) this.FindControl("txtReturnRemark");
     this.txtReplaceRemark           = (System.Web.UI.WebControls.TextBox) this.FindControl("txtReplaceRemark");
     this.dropRefundType             = (System.Web.UI.WebControls.DropDownList) this.FindControl("dropRefundType");
     this.dropRefundReason           = (System.Web.UI.WebControls.DropDownList) this.FindControl("dropRefundReason");
     this.dropReturnReason           = (System.Web.UI.WebControls.DropDownList) this.FindControl("dropReturnReason");
     this.dropReturnRefundType       = (System.Web.UI.WebControls.DropDownList) this.FindControl("dropReturnRefundType");
     this.dropPayType                = (System.Web.UI.WebControls.DropDownList) this.FindControl("dropPayType");
     this.plRefund                   = (System.Web.UI.WebControls.Panel) this.FindControl("plRefund");
     this.lblTotalBalance            = (FormatedMoneyLabel)this.FindControl("lblTotalBalance");
     this.litRefundOrderRemark       = (System.Web.UI.WebControls.Literal) this.FindControl("litRefundOrderRemark");
     this.litTax                     = (FormatedMoneyLabel)this.FindControl("litTax");
     this.litInvoiceTitle            = (System.Web.UI.WebControls.Literal) this.FindControl("litInvoiceTitle");
     this.hdorderId                  = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hdorderId");
     PageTitle.AddTitle("订单详细页", HiContext.Current.Context);
     this.btnPay.Click            += new System.EventHandler(this.btnPay_Click);
     this.btnOk.Click             += new System.EventHandler(this.btnOk_Click);
     this.btnReturn.Click         += new System.EventHandler(this.btnReturn_Click);
     this.btnReplace.Click        += new System.EventHandler(this.btnReplace_Click);
     this.lkbtnConfirmOrder.Click += new System.EventHandler(this.lkbtnConfirmOrder_Click);
     this.lkbtnCloseOrder.Click   += new System.EventHandler(this.lkbtnCloseOrder_Click);
     if (!this.Page.IsPostBack)
     {
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         if (orderInfo == null || orderInfo.UserId != HiContext.Current.User.UserId)
         {
             this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该订单不存在或者不属于当前用户的订单"));
             return;
         }
         this.BindOrderBase(orderInfo);
         this.BindOrderAddress(orderInfo);
         this.BindOrderItems(orderInfo);
         BindRefundReason();
         BindReturnReason();
     }
 }
Esempio n. 5
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("订单详情");
        }
Esempio n. 6
0
        private void dlstOrders_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                SiteSettings masterSettings = SettingsManager.GetMasterSettings();
                string       a = "";
                if (!(DataBinder.Eval(e.Item.DataItem, "Gateway") is DBNull))
                {
                    a = (string)DataBinder.Eval(e.Item.DataItem, "Gateway");
                }
                string          text             = DataBinder.Eval(e.Item.DataItem, "OrderId").ToString();
                OrderInfo       orderInfo        = TradeHelper.GetOrderInfo(text);
                OrderStatus     orderStatus      = (OrderStatus)DataBinder.Eval(e.Item.DataItem, "OrderStatus");
                int             num              = DataBinder.Eval(e.Item.DataItem, "ShippingModeId").ToInt(0);
                ImageLinkButton imageLinkButton  = (ImageLinkButton)e.Item.FindControl("lkbtnPayOrder");
                Literal         literal          = (Literal)e.Item.FindControl("litCloseOrder");
                HyperLink       hyperLink        = (HyperLink)e.Item.FindControl("lkbtnEditPrice");
                int             num2             = (int)((DataBinder.Eval(e.Item.DataItem, "GroupBuyId") is DBNull) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "GroupBuyId"));
                int             num3             = (int)((DataBinder.Eval(e.Item.DataItem, "CountDownBuyId") is DBNull) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "CountDownBuyId"));
                int             num4             = (int)((DataBinder.Eval(e.Item.DataItem, "BundlingId") is DBNull) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "BundlingId"));
                int             num5             = DataBinder.Eval(e.Item.DataItem, "ShippingModeId").ToInt(0);
                ImageLinkButton imageLinkButton2 = (ImageLinkButton)e.Item.FindControl("lkbtnConfirmOrder");
                Literal         literal2         = (Literal)e.Item.FindControl("litDivideStore");
                Literal         literal3         = (Literal)e.Item.FindControl("isGiftOrder");
                LinkButton      linkButton       = (LinkButton)e.Item.FindControl("lbtnFightGroup");
                Image           image            = (Image)e.Item.FindControl("imgError");
                HtmlAnchor      htmlAnchor       = (HtmlAnchor)e.Item.FindControl("lkbtnCheckRefund");
                HtmlInputHidden htmlInputHidden  = (HtmlInputHidden)e.Item.FindControl("hidFightGroup");
                HtmlAnchor      htmlAnchor2      = (HtmlAnchor)e.Item.FindControl("aftersaleImg");
                image.Visible = orderInfo.IsError;
                if (orderInfo.IsError)
                {
                    image.Attributes.Add("title", orderInfo.ErrorMessage);
                    image.ImageUrl = "\\Admin\\images\\orderError.png";
                }
                ProductPreSaleInfo productPreSaleInfo = null;
                if (orderInfo.PreSaleId > 0)
                {
                    Literal            literal4           = (Literal)e.Item.FindControl("litPreSale");
                    Literal            literal5           = (Literal)e.Item.FindControl("litSendGoods");
                    FormatedMoneyLabel formatedMoneyLabel = (FormatedMoneyLabel)e.Item.FindControl("lblOrderTotals");
                    e.Item.FindControl("lblAmount").Visible = true;
                    productPreSaleInfo = ProductPreSaleHelper.GetProductPreSaleInfo(orderInfo.PreSaleId);
                    literal4.Text      = "<font>定金:" + orderInfo.Deposit.F2ToString("f2") + "</font>";
                    Literal literal6 = literal4;
                    literal6.Text            = literal6.Text + "<font>尾款:" + orderInfo.FinalPayment.F2ToString("f2") + "</font>";
                    literal4.Visible         = true;
                    formatedMoneyLabel.Money = orderInfo.Deposit + orderInfo.FinalPayment;
                    formatedMoneyLabel.Text  = (orderInfo.Deposit + orderInfo.FinalPayment).ToString();
                    if (orderInfo.OrderStatus == OrderStatus.BuyerAlreadyPaid)
                    {
                        literal5.Visible = true;
                        DateTime dateTime;
                        if (productPreSaleInfo.DeliveryDate.HasValue)
                        {
                            Literal literal7 = literal5;
                            dateTime      = productPreSaleInfo.DeliveryDate.Value;
                            literal7.Text = "<span>预计发货时间:" + dateTime.ToString("yyyy-MM-dd") + "</span>";
                        }
                        else
                        {
                            DateTime payDate = orderInfo.PayDate;
                            if (orderInfo.PayDate != DateTime.MinValue)
                            {
                                Literal literal8 = literal5;
                                dateTime      = orderInfo.PayDate;
                                dateTime      = dateTime.AddDays((double)productPreSaleInfo.DeliveryDays);
                                literal8.Text = "<span>预计发货时间:" + dateTime.ToString("yyyy-MM-dd") + "</span>";
                            }
                        }
                    }
                }
                RefundInfo refundInfo = TradeHelper.GetRefundInfo(orderInfo.OrderId);
                if (orderInfo.ItemStatus != 0 || orderInfo.OrderStatus == OrderStatus.ApplyForRefund)
                {
                    if (orderInfo.OrderStatus == OrderStatus.ApplyForRefund)
                    {
                        if (refundInfo != null)
                        {
                            htmlAnchor2.Visible = true;
                            htmlAnchor2.Title   = "订单已申请退款";
                            htmlAnchor2.HRef    = "/Admin/sales/RefundApplyDetail?RefundId=" + refundInfo.RefundId;
                        }
                    }
                    else
                    {
                        int            num6           = 0;
                        AfterSaleTypes afterSaleTypes = AfterSaleTypes.ReturnAndRefund;
                        int            num7           = 0;
                        foreach (LineItemInfo value in orderInfo.LineItems.Values)
                        {
                            if (value.ReturnInfo != null || value.ReplaceInfo != null)
                            {
                                ReturnInfo  returnInfo  = value.ReturnInfo;
                                ReplaceInfo replaceInfo = value.ReplaceInfo;
                                if (num6 == 0 || (returnInfo != null && returnInfo.HandleStatus != ReturnStatus.Refused && returnInfo.HandleStatus != ReturnStatus.Returned) || (replaceInfo != null && (replaceInfo.HandleStatus != ReplaceStatus.Refused || replaceInfo.HandleStatus != ReplaceStatus.Replaced)))
                                {
                                    if (value.ReturnInfo != null)
                                    {
                                        afterSaleTypes = AfterSaleTypes.ReturnAndRefund;
                                        num7           = value.ReturnInfo.ReturnId;
                                    }
                                    else
                                    {
                                        afterSaleTypes = AfterSaleTypes.Replace;
                                        num7           = value.ReplaceInfo.ReplaceId;
                                    }
                                }
                                num6++;
                            }
                        }
                        if (orderInfo.ItemStatus == OrderItemStatus.HasReturnOrReplace)
                        {
                            htmlAnchor2.Title = "订单中有商品正在退货/换货中";
                        }
                        else if (orderInfo.ReturnedCount > 0)
                        {
                            htmlAnchor2.Title = "订单中有商品已退货完成";
                        }
                        else if (orderInfo.ItemStatus == OrderItemStatus.HasReplace)
                        {
                            htmlAnchor2.Title = "订单中有商品正在进行换货操作";
                        }
                        else if (orderInfo.ItemStatus == OrderItemStatus.HasReturn)
                        {
                            htmlAnchor2.Title = "订单中有商品正在进行退货操作";
                        }
                        if (num6 > 0)
                        {
                            htmlAnchor2.Visible = true;
                            if (afterSaleTypes == AfterSaleTypes.ReturnAndRefund)
                            {
                                htmlAnchor2.HRef = "ReturnApplyDetail?ReturnId=" + num7;
                            }
                            else
                            {
                                htmlAnchor2.HRef = "ReplaceApplyDetail?ReplaceId=" + num7;
                            }
                        }
                    }
                }
                if (orderInfo.FightGroupId > 0)
                {
                    FightGroupInfo fightGroup = VShopHelper.GetFightGroup(orderInfo.FightGroupId);
                    if (fightGroup != null)
                    {
                        linkButton.PostBackUrl = "/Admin/promotion/FightGroupDetails.aspx?fightGroupActivityId=" + fightGroup.FightGroupActivityId;
                        if (fightGroup.Status == FightGroupStatus.FightGroupIn && orderInfo.OrderStatus != OrderStatus.WaitBuyerPay && orderInfo.OrderStatus != OrderStatus.Closed)
                        {
                            htmlInputHidden.Value = "1";
                        }
                        else
                        {
                            htmlInputHidden.Value = "0";
                        }
                    }
                }
                else
                {
                    linkButton.Visible = false;
                }
                OrderStatusLabel orderStatusLabel = (OrderStatusLabel)e.Item.FindControl("lblOrderStatus");
                if (orderStatusLabel != null)
                {
                    orderStatusLabel.OrderItemStatus = orderInfo.ItemStatus;
                    if (orderInfo.PreSaleId > 0)
                    {
                        orderStatusLabel.PreSaleId   = orderInfo.PreSaleId;
                        orderStatusLabel.DepositDate = orderInfo.DepositDate;
                    }
                }
                HtmlAnchor htmlAnchor3 = (HtmlAnchor)e.Item.FindControl("lkbtnToDetail");
                int        num8        = (int)((DataBinder.Eval(e.Item.DataItem, "StoreId") == DBNull.Value) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "StoreId"));
                bool       flag        = (bool)((DataBinder.Eval(e.Item.DataItem, "IsStoreCollect") == DBNull.Value) ? ((object)false) : DataBinder.Eval(e.Item.DataItem, "IsStoreCollect"));
                bool       flag2       = false;
                if (refundInfo != null)
                {
                    htmlAnchor.HRef = "/Admin/sales/RefundApplyDetail?RefundId=" + refundInfo.RefundId.ToString();
                    flag2           = true;
                }
                if (orderInfo.LineItems.Count <= 0)
                {
                    literal3.Text = "(礼)";
                }
                Literal literal9 = (Literal)e.Item.FindControl("group");
                if (literal9 != null)
                {
                    if (num2 > 0)
                    {
                        literal9.Text = "(团)";
                    }
                    if (num3 > 0)
                    {
                        literal9.Text = "(抢)";
                    }
                    if (orderInfo.PreSaleId > 0)
                    {
                        literal9.Text = "(预)";
                    }
                }
                if (orderStatus == OrderStatus.WaitBuyerPay)
                {
                    if (orderInfo.PreSaleId > 0)
                    {
                        if (!orderInfo.DepositDate.HasValue)
                        {
                            hyperLink.NavigateUrl = "javascript:DialogFrame('/Admin/sales/EditOrder.aspx?OrderId=" + text + "','修改订单价格',null,null,function(e){location.reload();})";
                            hyperLink.Visible     = true;
                            literal.Visible       = true;
                            if (a != "hishop.plugins.payment.podrequest" && num != -2 && orderInfo.FightGroupId == 0)
                            {
                                imageLinkButton.Visible = true;
                            }
                        }
                        else if (productPreSaleInfo.PaymentStartDate <= DateTime.Now && productPreSaleInfo.PaymentEndDate >= DateTime.Now && a != "hishop.plugins.payment.podrequest" && num != -2 && orderInfo.FightGroupId == 0)
                        {
                            imageLinkButton.Visible = true;
                        }
                    }
                    else
                    {
                        hyperLink.NavigateUrl = "javascript:DialogFrame('/Admin/sales/EditOrder.aspx?OrderId=" + text + "','修改订单价格',null,null,function(e){location.reload();})";
                        hyperLink.Visible     = true;
                        if (a != "hishop.plugins.payment.podrequest" && num != -2 && orderInfo.FightGroupId == 0 && (orderInfo.ParentOrderId == "0" || orderInfo.ParentOrderId == "-1"))
                        {
                            imageLinkButton.Visible = true;
                        }
                    }
                }
                if (a == "hishop.plugins.payment.podrequest")
                {
                    int num9;
                    switch (orderStatus)
                    {
                    case OrderStatus.SellerAlreadySent:
                        num9 = ((orderInfo.ParentOrderId == "0" || orderInfo.ParentOrderId == "-1") ? 1 : 0);
                        break;

                    default:
                        num9 = 0;
                        break;

                    case OrderStatus.WaitBuyerPay:
                        num9 = 1;
                        break;
                    }
                    if (num9 != 0)
                    {
                        literal.Visible = true;
                    }
                }
                if (orderStatus == OrderStatus.SellerAlreadySent && orderInfo.StoreId > 0 && masterSettings.OpenMultStore)
                {
                    literal.Visible = false;
                }
                if (orderStatus == OrderStatus.ApplyForRefund && !orderInfo.IsStoreCollect)
                {
                    htmlAnchor.Visible = true;
                }
                imageLinkButton2.Visible = (orderStatus == OrderStatus.SellerAlreadySent && orderInfo.ItemStatus == OrderItemStatus.Nomarl);
                if (masterSettings.OpenMultStore && num == -2 && orderStatus == OrderStatus.WaitBuyerPay)
                {
                    literal.Visible   = !orderInfo.IsConfirm;
                    hyperLink.Visible = true;
                    if (a != "hishop.plugins.payment.podrequest" && orderInfo.PaymentTypeId != -3 && orderInfo.FightGroupId == 0)
                    {
                        imageLinkButton.Visible = true;
                    }
                }
            }
        }
Esempio n. 7
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.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.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.litVoucherPrice  = (System.Web.UI.WebControls.Literal) this.FindControl("litVoucherPrice");
            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");
            this.rptPromotions    = (VshopTemplatedRepeater)this.FindControl("rptPromotions");
            this.litPayCharge     = (System.Web.UI.WebControls.Literal) this.FindControl("lblPayCharge");
            this.litTax           = (System.Web.UI.WebControls.Literal) this.FindControl("litTax");
            this.litPayCharge     = (System.Web.UI.WebControls.Literal) this.FindControl("litPayCharge");
            this.LinkNowPay       = (System.Web.UI.WebControls.HyperLink) this.FindControl("LinkNowPay");
            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.IsRefund        = orderInfo.IsRefund;
            this.litOrderStatus.OrderStatusCode = orderInfo.OrderStatus;
            this.litPayTime.SetWhenIsNotNull((orderInfo.PayDate != System.DateTime.MinValue) ? orderInfo.PayDate.ToString("yyyy-MM-dd HH:mm:ss") : "");
            this.orderStatus.SetWhenIsNotNull(((int)orderInfo.OrderStatus).ToString());
            this.txtOrderId.SetWhenIsNotNull(this.orderId.ToString());
            this.litCounponPrice.SetWhenIsNotNull(orderInfo.CouponValue.ToString("F2"));
            this.litVoucherPrice.SetWhenIsNotNull(orderInfo.VoucherValue.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.AdjustedDiscount.ToString("F2"));
            this.litActualPrice.SetWhenIsNotNull(orderInfo.GetTotal().ToString("F2"));
            this.litRemark.SetWhenIsNotNull(orderInfo.Remark);
            this.litTax.SetWhenIsNotNull(orderInfo.Tax.ToString("F2"));
            this.litPayCharge.SetWhenIsNotNull(orderInfo.PayCharge.ToString("F2"));
            this.rptOrderProducts.DataSource = orderInfo.LineItems.Values;
            this.rptOrderProducts.DataBind();
            System.Collections.Generic.List <System.Collections.Generic.KeyValuePair <string, string> > list = new System.Collections.Generic.List <System.Collections.Generic.KeyValuePair <string, string> >();
            if (orderInfo.IsReduced)
            {
                list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.Reduced), orderInfo.ReducedPromotionName + string.Format(" 优惠:{0}", orderInfo.ReducedPromotionAmount.ToString("F2"))));
            }
            if (orderInfo.IsFreightFree)
            {
                list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.FullAmountSentFreight), string.Format("{0}", orderInfo.FreightFreePromotionName)));
            }
            if (orderInfo.IsSendTimesPoint)
            {
                list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.FullAmountSentTimesPoint), string.Format("{0}:送{1}倍", orderInfo.SentTimesPointPromotionName, orderInfo.TimesPoint.ToString("F2"))));
            }
            //未支付,则显示立即支付按钮
            if (orderInfo.OrderStatus == OrderStatus.WaitBuyerPay)
            {
                LinkNowPay.Style.Add("display", "block");
                if (!string.IsNullOrEmpty(orderInfo.Gateway) && orderInfo.Gateway == "Ecdev.plugins.payment.weixinrequest")
                {
                    LinkNowPay.Attributes.Add("href", "../../pay/wx_Submit.aspx?orderId=" + this.orderId);
                }
            }

            this.rptPromotions.DataSource = list;
            this.rptPromotions.DataBind();
            PageTitle.AddSiteNameTitle("订单详情");
        }
Esempio n. 8
0
 protected override void AttachChildControls()
 {
     this.orderId = base.GetParameter("orderId", false);
     this.litFightGroupStatusLabel = (FightGroupStatusLabel)this.FindControl("litFightGroupStatusLabel");
     this.litOrderId          = (Literal)this.FindControl("litOrderId");
     this.lbltotalPrice       = (FormatedMoneyLabel)this.FindControl("lbltotalPrice");
     this.litAddDate          = (FormatedTimeLabel)this.FindControl("litAddDate");
     this.lblOrderStatus      = (OrderStatusLabel)this.FindControl("lblOrderStatus");
     this.litCloseReason      = (Literal)this.FindControl("litCloseReason");
     this.litRemark           = (Literal)this.FindControl("litRemark");
     this.litShipTo           = (Literal)this.FindControl("litShipTo");
     this.litRegion           = (Literal)this.FindControl("litRegion");
     this.litAddress          = (Literal)this.FindControl("litAddress");
     this.litZipcode          = (Literal)this.FindControl("litZipcode");
     this.litEmail            = (Literal)this.FindControl("litEmail");
     this.litPhone            = (Literal)this.FindControl("litPhone");
     this.litTellPhone        = (Literal)this.FindControl("litTellPhone");
     this.litShipToDate       = (Literal)this.FindControl("litShipToDate");
     this.litPaymentType      = (Literal)this.FindControl("litPaymentType");
     this.litModeName         = (Literal)this.FindControl("litModeName");
     this.plOrderSended       = (Panel)this.FindControl("plOrderSended");
     this.litRealModeName     = (Literal)this.FindControl("litRealModeName");
     this.litShippNumber      = (Literal)this.FindControl("litShippNumber");
     this.litDiscountName     = (HyperLink)this.FindControl("litDiscountName");
     this.lblAdjustedDiscount = (FormatedMoneyLabel)this.FindControl("lblAdjustedDiscount");
     this.litFreeName         = (HyperLink)this.FindControl("litFreeName");
     this.plExpress           = (Panel)this.FindControl("plExpress");
     this.power                      = (HtmlAnchor)this.FindControl("power");
     this.litTakeCode                = (Literal)this.FindControl("litTakeCode");
     this.litStoreInfo               = (Literal)this.FindControl("litStoreInfo");
     this.litStoreName               = (Literal)this.FindControl("litStoreName");
     this.litStoreTel                = (Literal)this.FindControl("litStoreTel");
     this.divstoreinfo               = (HtmlGenericControl)this.FindControl("divstoreinfo");
     this.divInvoiceTitle            = (HtmlGenericControl)this.FindControl("divInvoiceTitle");
     this.divInvoiceTaxpayerNumber   = (HtmlGenericControl)this.FindControl("divInvoiceTaxpayerNumber");
     this.divTax                     = (HtmlGenericControl)this.FindControl("divTax");
     this.listOrders                 = (Common_OrderManage_OrderItems)this.FindControl("Common_OrderManage_OrderItems");
     this.orderGifts                 = (Common_OrderManage_OrderGifts)this.FindControl("Common_OrderManage_OrderGifts");
     this.plOrderGift                = (Panel)this.FindControl("plOrderGift");
     this.lblBundlingPrice           = (Literal)this.FindControl("lblBundlingPrice");
     this.litPoints                  = (Literal)this.FindControl("litPoints");
     this.litSentTimesPointPromotion = (HyperLink)this.FindControl("litSentTimesPointPromotion");
     this.litWeight                  = (Literal)this.FindControl("litWeight");
     this.litFree                    = (Literal)this.FindControl("litFree");
     this.lblFreight                 = (FormatedMoneyLabel)this.FindControl("lblFreight");
     this.litCouponValue             = (Literal)this.FindControl("litCouponValue");
     this.litPointMoney              = (Literal)this.FindControl("litPointMoney");
     this.lblDiscount                = (FormatedMoneyLabel)this.FindControl("lblDiscount");
     this.litTotalPrice              = (FormatedMoneyLabel)this.FindControl("litTotalPrice");
     this.lblRefundTotal             = (FormatedMoneyLabel)this.FindControl("lblRefundTotal");
     this.litAddOrderDate            = (FormatedTimeLabel)this.FindControl("litAddOrderDate");
     this.litPayDate                 = (FormatedTimeLabel)this.FindControl("litPayDate");
     this.litPayBack                 = (FormatedTimeLabel)this.FindControl("litPayBack");
     this.litBackShip                = (FormatedTimeLabel)this.FindControl("litBackShip");
     this.litShipDate                = (FormatedTimeLabel)this.FindControl("litShipDate");
     this.litResultDate              = (FormatedTimeLabel)this.FindControl("litResultDate");
     this.lkbtnConfirmOrder          = (LinkButton)this.FindControl("lkbtnConfirmOrder");
     this.lkbtnCloseOrder            = (LinkButton)this.FindControl("lkbtnCloseOrder");
     this.hidExpressCompanyName      = (HiddenField)this.FindControl("hidExpressCompanyName");
     this.hidShipOrderNumber         = (HiddenField)this.FindControl("hidShipOrderNumber");
     this.hidHiPOSTakeCode           = (HiddenField)this.FindControl("hidHiPOSTakeCode");
     this.btnPay                     = (Button)this.FindControl("btnPay");
     this.lbRefundMoney              = (Label)this.FindControl("lbRefundMoney");
     this.lbRefundMoney              = (Label)this.FindControl("lbRefundMoney");
     this.lbCloseReason              = (Label)this.FindControl("lbCloseReason");
     this.txtRemark                  = (TextBox)this.FindControl("txtRemark");
     this.txtReturnRemark            = (TextBox)this.FindControl("txtReturnRemark");
     this.txtReplaceRemark           = (TextBox)this.FindControl("txtReplaceRemark");
     this.dropRefundType             = (RefundTypeDropDownList)this.FindControl("dropRefundType");
     this.dropReturnRefundType       = (RefundTypeDropDownList)this.FindControl("dropReturnRefundType");
     this.dropPayType                = (DropDownList)this.FindControl("dropPayType");
     this.plRefund                   = (Panel)this.FindControl("plRefund");
     this.lblTotalBalance            = (FormatedMoneyLabel)this.FindControl("lblTotalBalance");
     this.litRefundOrderRemark       = (Literal)this.FindControl("litRefundOrderRemark");
     this.litInvoiceTitle            = (Literal)this.FindControl("litInvoiceTitle");
     this.litInvoiceTaxpayerNumber   = (Literal)this.FindControl("litInvoiceTaxpayerNumber");
     this.litTax                     = (FormatedMoneyLabel)this.FindControl("litTax");
     this.hdorderId                  = (HtmlInputHidden)this.FindControl("hdorderId");
     this.lkbtnApplyForRefund        = (HtmlAnchor)this.FindControl("lkbtnApplyForRefund");
     this.lkbtnUserRealNameVerify    = (HtmlAnchor)this.FindControl("lkbtnUserRealNameVerify");
     this.hidPreSaleId               = (HiddenField)this.FindControl("hidPreSaleId");
     this.hidIsPayDeposit            = (HiddenField)this.FindControl("hidIsPayDeposit");
     this.hidIsPaymentStore          = (HiddenField)this.FindControl("hidIsPaymentStore");
     this.litDepositPayDate          = (FormatedTimeLabel)this.FindControl("litDepositPayDate");
     this.litFinalPamentPayDate      = (Literal)this.FindControl("litFinalPamentPayDate");
     this.lblDeposit                 = (FormatedMoneyLabel)this.FindControl("lblDeposit");
     this.lblFinalPayment            = (FormatedMoneyLabel)this.FindControl("lblFinalPayment");
     this.litGetGoodsRemark          = (Literal)this.FindControl("litGetGoodsRemark");
     this.divPickUpRemark            = (HtmlGenericControl)this.FindControl("divPickUpRemark");
     this.litBalanceAmount           = (Literal)this.FindControl("litBalanceAmount");
     this.hidExpressStatus           = (HtmlInputHidden)this.FindControl("hidExpressStatus");
     this.litInvoiceType             = (Literal)this.FindControl("litInvoiceType");
     this.litRegisterAddress         = (Literal)this.FindControl("litRegisterAddress");
     this.litRegisterTel             = (Literal)this.FindControl("litRegisterTel");
     this.litOpenBank                = (Literal)this.FindControl("litOpenBank");
     this.litBankName                = (Literal)this.FindControl("litBankName");
     this.litReceiveName             = (Literal)this.FindControl("litReceiveName");
     this.litReceiveMobbile          = (Literal)this.FindControl("litReceiveMobbile");
     this.litReceiveEmail            = (Literal)this.FindControl("litReceiveEmail");
     this.litReceiveRegionName       = (Literal)this.FindControl("litReceiveRegionName");
     this.litReceiveAddress          = (Literal)this.FindControl("litReceiveAddress");
     this.listOrders.ItemDataBound  += this.orderItems_ItemDataBound;
     PageTitle.AddTitle("订单详细页", HiContext.Current.Context);
     this.order = TradeHelper.GetOrderInfo(this.orderId);
     this.divInvoiceTitle.Visible          = (this.order.Tax > decimal.Zero && !string.IsNullOrEmpty(this.order.InvoiceTitle));
     this.divInvoiceTaxpayerNumber.Visible = (this.order.Tax > decimal.Zero && !string.IsNullOrEmpty(this.order.InvoiceTaxpayerNumber));
     this.divTax.Visible           = (this.order.Tax > decimal.Zero);
     this.btnPay.Click            += this.btnPay_Click;
     this.lkbtnConfirmOrder.Click += this.lkbtnConfirmOrder_Click;
     this.lkbtnCloseOrder.Click   += this.lkbtnCloseOrder_Click;
     if (!this.Page.IsPostBack)
     {
         if (!string.IsNullOrEmpty(this.order.TakeCode))
         {
             this.hidHiPOSTakeCode.Value = Globals.HIPOSTAKECODEPREFIX + this.order.TakeCode;
         }
         if (this.order == null || this.order.UserId != HiContext.Current.UserId)
         {
             this.Page.Response.Redirect("/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该订单不存在或者不属于当前用户的订单"));
         }
         else
         {
             this.BindOrderBase(this.order);
             this.BindOrderAddress(this.order);
             this.BindOrderItems(this.order);
             this.BindStoreInfo(this.order);
             if (!string.IsNullOrEmpty(this.order.InvoiceTitle))
             {
                 UserInvoiceDataInfo userInvoiceDataInfo = this.order.InvoiceInfo;
                 if (userInvoiceDataInfo == null)
                 {
                     userInvoiceDataInfo = new UserInvoiceDataInfo
                     {
                         InvoiceType           = this.order.InvoiceType,
                         InvoiceTaxpayerNumber = this.order.InvoiceTaxpayerNumber.ToNullString(),
                         InvoiceTitle          = this.order.InvoiceTitle.ToNullString()
                     };
                 }
                 this.litInvoiceTaxpayerNumber.SetWhenIsNotNull(this.order.InvoiceTaxpayerNumber);
                 this.litInvoiceTitle.SetWhenIsNotNull(this.order.InvoiceTitle);
                 this.litInvoiceType.SetWhenIsNotNull(EnumDescription.GetEnumDescription((Enum)(object)this.order.InvoiceType, 0));
                 this.litRegisterAddress.SetWhenIsNotNull(userInvoiceDataInfo.RegisterAddress.ToNullString());
                 this.litRegisterTel.SetWhenIsNotNull(userInvoiceDataInfo.RegisterTel.ToNullString());
                 this.litOpenBank.SetWhenIsNotNull(userInvoiceDataInfo.OpenBank.ToNullString());
                 this.litBankName.SetWhenIsNotNull(userInvoiceDataInfo.BankAccount.ToNullString());
                 this.litReceiveName.SetWhenIsNotNull(userInvoiceDataInfo.ReceiveName.ToNullString());
                 if (this.order.InvoiceType != InvoiceType.Enterprise)
                 {
                     this.litReceiveMobbile.SetWhenIsNotNull(userInvoiceDataInfo.ReceivePhone.ToNullString());
                     if (this.order.InvoiceType != InvoiceType.VATInvoice)
                     {
                         this.litReceiveEmail.SetWhenIsNotNull(userInvoiceDataInfo.ReceiveEmail.ToNullString());
                     }
                 }
                 this.litReceiveRegionName.SetWhenIsNotNull(userInvoiceDataInfo.ReceiveRegionName.ToNullString());
                 this.litReceiveAddress.SetWhenIsNotNull(userInvoiceDataInfo.ReceiveAddress.ToNullString());
             }
             if (this.order.FightGroupId > 0)
             {
                 FightGroupInfo fightGroup = VShopHelper.GetFightGroup(this.order.FightGroupId);
                 this.lkbtnApplyForRefund.Visible    = (fightGroup.Status != 0 && this.order.OrderStatus == OrderStatus.BuyerAlreadyPaid && this.order.GetPayTotal() > decimal.Zero);
                 this.litFightGroupStatusLabel.Order = this.order;
             }
         }
     }
 }
        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.litOrderDate     = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderDate");
            this.litOrderStatus   = (OrderStatusLabel)this.FindControl("litOrderStatus");
            this.rptOrderProducts = (WapTemplatedRepeater)this.FindControl("rptOrderProducts");
            this.litTotalPrice    = (System.Web.UI.WebControls.Literal) this.FindControl("litTotalPrice");
            this.litPayTime       = (System.Web.UI.WebControls.Literal) this.FindControl("litPayTime");
            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.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");
            this.rptPromotions    = (WapTemplatedRepeater)this.FindControl("rptPromotions");
            this.litTax           = (System.Web.UI.WebControls.Literal) this.FindControl("litTax");
            this.litPayCharge     = (System.Web.UI.WebControls.Literal) this.FindControl("litPayCharge");
            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 != System.DateTime.MinValue) ? orderInfo.PayDate.ToString("yyyy-MM-dd HH:mm:ss") : "");
            this.orderStatus.SetWhenIsNotNull(((int)orderInfo.OrderStatus).ToString());
            this.txtOrderId.SetWhenIsNotNull(this.orderId.ToString());
            this.litCounponPrice.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.AdjustedDiscount.ToString("F2"));
            this.litActualPrice.SetWhenIsNotNull(orderInfo.GetTotal().ToString("F2"));
            this.litRemark.SetWhenIsNotNull(orderInfo.Remark);
            this.litTax.SetWhenIsNotNull(orderInfo.Tax.ToString("F2"));
            this.litPayCharge.SetWhenIsNotNull(orderInfo.PayCharge.ToString("F2"));
            this.rptOrderProducts.DataSource = orderInfo.LineItems.Values;
            this.rptOrderProducts.DataBind();
            System.Collections.Generic.List <System.Collections.Generic.KeyValuePair <string, string> > list = new System.Collections.Generic.List <System.Collections.Generic.KeyValuePair <string, string> >();
            if (orderInfo.IsReduced)
            {
                list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.Reduced), orderInfo.ReducedPromotionName + string.Format(" 优惠:{0}", orderInfo.ReducedPromotionAmount.ToString("F2"))));
            }
            if (orderInfo.IsFreightFree)
            {
                list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.FullAmountSentFreight), string.Format("{0}", orderInfo.FreightFreePromotionName)));
            }
            if (orderInfo.IsSendTimesPoint)
            {
                list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.FullAmountSentTimesPoint), string.Format("{0}:送{1}倍", orderInfo.SentTimesPointPromotionName, orderInfo.TimesPoint.ToString("F2"))));
            }
            this.rptPromotions.DataSource = list;
            this.rptPromotions.DataBind();
            PageTitle.AddSiteNameTitle("订单详情");

            WAPHeadName.AddHeadName("订单详情");
        }
 protected override void AttachChildControls()
 {
     this.orderId             = this.Page.Request.QueryString["orderId"];
     this.litOrderId          = (Literal)this.FindControl("litOrderId");
     this.lbltotalPrice       = (FormatedMoneyLabel)this.FindControl("lbltotalPrice");
     this.litAddDate          = (FormatedTimeLabel)this.FindControl("litAddDate");
     this.lblOrderStatus      = (OrderStatusLabel)this.FindControl("lblOrderStatus");
     this.litCloseReason      = (Literal)this.FindControl("litCloseReason");
     this.litRemark           = (Literal)this.FindControl("litRemark");
     this.litShipTo           = (Literal)this.FindControl("litShipTo");
     this.litRegion           = (Literal)this.FindControl("litRegion");
     this.litAddress          = (Literal)this.FindControl("litAddress");
     this.litZipcode          = (Literal)this.FindControl("litZipcode");
     this.litEmail            = (Literal)this.FindControl("litEmail");
     this.litPhone            = (Literal)this.FindControl("litPhone");
     this.litTellPhone        = (Literal)this.FindControl("litTellPhone");
     this.litShipToDate       = (Literal)this.FindControl("litShipToDate");
     this.litUserName         = (Literal)this.FindControl("litUserName");
     this.litUserAddress      = (Literal)this.FindControl("litUserAddress");
     this.litUserEmail        = (Literal)this.FindControl("litUserEmail");
     this.litUserPhone        = (Literal)this.FindControl("litUserPhone");
     this.litUserTellPhone    = (Literal)this.FindControl("litUserTellPhone");
     this.litUserQQ           = (Literal)this.FindControl("litUserQQ");
     this.litUserMSN          = (Literal)this.FindControl("litUserMSN");
     this.litPaymentType      = (Literal)this.FindControl("litPaymentType");
     this.litModeName         = (Literal)this.FindControl("litModeName");
     this.plOrderSended       = (Panel)this.FindControl("plOrderSended");
     this.litRealModeName     = (Literal)this.FindControl("litRealModeName");
     this.litShippNumber      = (Literal)this.FindControl("litShippNumber");
     this.litDiscountName     = (HyperLink)this.FindControl("litDiscountName");
     this.lblAdjustedDiscount = (FormatedMoneyLabel)this.FindControl("lblAdjustedDiscount");
     this.litFreeName         = (HyperLink)this.FindControl("litFreeName");
     this.plExpress           = (Panel)this.FindControl("plExpress");
     this.power                      = (HtmlAnchor)this.FindControl("power");
     this.orderItems                 = (Common_OrderManage_OrderItems)this.FindControl("Common_OrderManage_OrderItems");
     this.grdOrderGift               = (GridView)this.FindControl("grdOrderGift");
     this.plOrderGift                = (Panel)this.FindControl("plOrderGift");
     this.lblCartMoney               = (FormatedMoneyLabel)this.FindControl("lblCartMoney");
     this.lblBundlingPrice           = (Literal)this.FindControl("lblBundlingPrice");
     this.litPoints                  = (Literal)this.FindControl("litPoints");
     this.litSentTimesPointPromotion = (HyperLink)this.FindControl("litSentTimesPointPromotion");
     this.litWeight                  = (Literal)this.FindControl("litWeight");
     this.litFree                    = (Literal)this.FindControl("litFree");
     this.lblFreight                 = (FormatedMoneyLabel)this.FindControl("lblFreight");
     this.lblPayCharge               = (FormatedMoneyLabel)this.FindControl("lblPayCharge");
     this.litCouponValue             = (Literal)this.FindControl("litCouponValue");
     this.lblDiscount                = (FormatedMoneyLabel)this.FindControl("lblDiscount");
     this.litTotalPrice              = (FormatedMoneyLabel)this.FindControl("litTotalPrice");
     this.lblRefundTotal             = (FormatedMoneyLabel)this.FindControl("lblRefundTotal");
     this.lbRefundMoney              = (Label)this.FindControl("lbRefundMoney");
     this.plRefund                   = (Panel)this.FindControl("plRefund");
     this.lblTotalBalance            = (FormatedMoneyLabel)this.FindControl("lblTotalBalance");
     this.litRefundOrderRemark       = (Literal)this.FindControl("litRefundOrderRemark");
     this.litTax                     = (FormatedMoneyLabel)this.FindControl("litTax");
     this.litInvoiceTitle            = (Literal)this.FindControl("litInvoiceTitle");
     PageTitle.AddTitle("订单详细页", HiContext.Current.Context);
     if (!this.Page.IsPostBack)
     {
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         if ((orderInfo == null) || (orderInfo.UserId != HiContext.Current.User.UserId))
         {
             this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该订单不存在或者不属于当前用户的订单"));
         }
         else
         {
             this.BindOrderBase(orderInfo);
             this.BindOrderAddress(orderInfo);
             this.BindOrderItems(orderInfo);
             this.BindOrderRefund(orderInfo);
             this.BindOrderReturn(orderInfo);
         }
     }
 }
 private void LoadAllControls()
 {
     this.liFullReduction          = (HtmlGenericControl)this.FindControl("liFullReduction");
     this.litFightGroupStatusLabel = (FightGroupStatusLabel)this.FindControl("litFightGroupStatusLabel");
     this.ensureRecieved           = (HtmlAnchor)this.FindControl("ensureRecieved");
     this.btnOrderRefund           = (HtmlAnchor)this.FindControl("btnOrderRefund");
     this.btnOrderClose            = (HtmlAnchor)this.FindControl("btnOrderClose");
     this.lookupQRCode             = (HtmlAnchor)this.FindControl("lookupQRCode");
     this.lookupTrans              = (HtmlAnchor)this.FindControl("lookupTrans");
     this.litShipTo                = (Literal)this.FindControl("litShipTo");
     this.litPhone                 = (Literal)this.FindControl("litPhone");
     this.divStoreAddress          = (HtmlGenericControl)this.FindControl("divStoreAddress");
     this.divLogists               = (HtmlGenericControl)this.FindControl("divLogists");
     this.divShipAddress           = (HtmlGenericControl)this.FindControl("divShipAddress");
     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         = (Common_MemberOrderProducts)this.FindControl("rptOrderProducts");
     this.litTotalPrice            = (Literal)this.FindControl("litTotalPrice");
     this.litPayTime               = (Literal)this.FindControl("litPayTime");
     this.divstoreinfo             = (HtmlGenericControl)this.FindControl("divstoreinfo");
     this.orderStatus              = (HtmlInputHidden)this.FindControl("orderStatus");
     this.hidOrderId               = (HtmlInputHidden)this.FindControl("hidOrderId");
     this.hidShowRedEnvelope       = (HtmlInputHidden)this.FindControl("hidShowRedEnvelope");
     this.dvClose                  = (HtmlControl)this.FindControl("dvClose");
     this.litRemark                = (Literal)this.FindControl("litRemark");
     this.litShipToDate            = (Literal)this.FindControl("litShipToDate");
     this.litTakeCode              = (Literal)this.FindControl("litTakeCode");
     this.litStoreInfo             = (Literal)this.FindControl("litStoreInfo");
     this.litStoreName             = (Literal)this.FindControl("litStoreName");
     this.litStoreTel              = (Literal)this.FindControl("litStoreTel");
     this.litCloseReason           = (Literal)this.FindControl("litCloseReason");
     this.litCounponPrice          = (Literal)this.FindControl("litCounponPrice");
     this.litPointsPrice           = (Literal)this.FindControl("litPointsPrice");
     this.liPointPrice             = (HtmlGenericControl)this.FindControl("liPointPrice");
     this.litBuildPrice            = (Literal)this.FindControl("litBuildPrice");
     this.litDisCountPrice         = (Literal)this.FindControl("litDisCountPrice");
     this.litFreight               = (Literal)this.FindControl("litFreight");
     this.litFreight2              = (Literal)this.FindControl("litFreight2");
     this.giftFreight              = (HtmlGenericControl)this.FindControl("giftFreight");
     this.litInvoiceTitle          = (Literal)this.FindControl("litInvoiceTitle");
     this.liInvoiceTitle           = (HtmlGenericControl)this.FindControl("liInvoiceTitle");
     this.litInvoiceTaxpayerNumber = (Literal)this.FindControl("litInvoiceTaxpayerNumber");
     this.liInvoiceTaxpayerNumber  = (HtmlGenericControl)this.FindControl("liInvoiceTaxpayerNumber");
     this.liCounponPrice           = (HtmlGenericControl)this.FindControl("liCounponPrice");
     this.liDiscountPrice          = (HtmlGenericControl)this.FindControl("liDiscountPrice");
     this.litFullCapacityReduction = (Literal)this.FindControl("litFullCapacityReduction");
     this.litPaymentMode           = (Literal)this.FindControl("litPaymentMode");
     this.btnOrderCancel           = (HtmlAnchor)this.FindControl("btnOrderCancel");
     this.litTax            = (Literal)this.FindControl("litTax");
     this.rptCartGifts      = (AppshopTemplatedRepeater)this.FindControl("rptCartGifts");
     this.rptPromotionGifts = (AppshopTemplatedRepeater)this.FindControl("rptPromotionGifts");
     this.divRefund         = (HtmlGenericControl)this.FindControl("divRefund");
     this.litRefundMoney    = (Literal)this.FindControl("litRefundMoney");
     this.divRefundPoint    = (HtmlGenericControl)this.FindControl("divRefundPoint");
     this.divGifts          = (HtmlGenericControl)this.FindControl("divGifts");
     this.divProducts       = (HtmlGenericControl)this.FindControl("divProducts");
     this.litRefundPoint    = (Literal)this.FindControl("litRefundPoint");
     this.liTax             = (HtmlGenericControl)this.FindControl("liTax");
     this.btnToPay          = (HtmlAnchor)this.FindControl("btnToPay");
     this.paymenttypeselect = (Common_AppPaymentTypeSelect)this.FindControl("paymenttypeselect");
     this.hidpresaleStaut   = (HtmlInputHidden)this.FindControl("hidpresaleStaut");
     this.litDepositDate    = (Literal)this.FindControl("litDepositDate");
     this.litFinalDate      = (Literal)this.FindControl("litFinalDate");
     this.litDeposit        = (Literal)this.FindControl("litDeposit");
     this.litFinal          = (Literal)this.FindControl("litFinal");
     this.litGetGoodsRemark = (Literal)this.FindControl("litGetGoodsRemark");
     this.divPickUpRemark   = (HtmlGenericControl)this.FindControl("divPickUpRemark");
 }
Esempio n. 12
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.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("订单详情");
        }
Esempio n. 13
0
        private void dlstOrders_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem)
            {
                return;
            }
            string      orderId     = DataBinder.Eval(e.Item.DataItem, "OrderId").ToString();
            OrderInfo   orderInfo   = TradeHelper.GetOrderInfo(orderId);
            OrderStatus orderStatus = (OrderStatus)DataBinder.Eval(e.Item.DataItem, "OrderStatus");
            HtmlAnchor  htmlAnchor  = (HtmlAnchor)e.Item.FindControl("lkbtnCheckTake");
            Literal     literal     = (Literal)e.Item.FindControl("litCloseOrder");
            int         num         = DataBinder.Eval(e.Item.DataItem, "ShippingModeId").ToInt(0);
            string      text        = "";

            if (!(DataBinder.Eval(e.Item.DataItem, "Gateway") is DBNull))
            {
                text = (string)DataBinder.Eval(e.Item.DataItem, "Gateway");
            }
            int              num2             = (int)((DataBinder.Eval(e.Item.DataItem, "GroupBuyId") is DBNull) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "GroupBuyId"));
            int              num3             = (int)((DataBinder.Eval(e.Item.DataItem, "CountDownBuyId") is DBNull) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "CountDownBuyId"));
            Label            label            = (Label)e.Item.FindControl("lkbtnSendGoods");
            ImageLinkButton  imageLinkButton  = (ImageLinkButton)e.Item.FindControl("lkbtnPayOrder");
            ImageLinkButton  imageLinkButton2 = (ImageLinkButton)e.Item.FindControl("lkbtnConfirmOrder");
            HtmlAnchor       htmlAnchor2      = (HtmlAnchor)e.Item.FindControl("lkbtnCheckRefund");
            ImageLinkButton  imageLinkButton3 = (ImageLinkButton)e.Item.FindControl("lkbtnConfirm");
            int              num4             = (int)((DataBinder.Eval(e.Item.DataItem, "StoreId") == DBNull.Value) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "StoreId"));
            bool             flag             = (bool)((DataBinder.Eval(e.Item.DataItem, "IsStoreCollect") == DBNull.Value) ? ((object)false) : DataBinder.Eval(e.Item.DataItem, "IsStoreCollect"));
            OrderStatusLabel orderStatusLabel = (OrderStatusLabel)e.Item.FindControl("lblOrderStatus");

            if (orderStatusLabel != null)
            {
                orderStatusLabel.OrderItemStatus = orderInfo.ItemStatus;
                if (orderInfo.PreSaleId > 0)
                {
                    orderStatusLabel.PreSaleId   = orderInfo.PreSaleId;
                    orderStatusLabel.DepositDate = orderInfo.DepositDate;
                }
            }
            bool       flag2      = false;
            RefundInfo refundInfo = TradeHelper.GetRefundInfo(orderId);

            if (refundInfo != null && orderInfo.StoreId == this.UserStoreId)
            {
                htmlAnchor2.Attributes.Add("refundid", refundInfo.RefundId.ToString());
                flag2 = true;
            }
            Literal literal2 = (Literal)e.Item.FindControl("group");

            if (literal2 != null)
            {
                if (num2 > 0)
                {
                    literal2.Text = "(团)";
                }
                if (num3 > 0)
                {
                    literal2.Text = "(抢)";
                }
                if (orderInfo.PreSaleId > 0)
                {
                    literal2.Text = "(预)";
                }
            }
            if (orderStatus == OrderStatus.WaitBuyerPay)
            {
                if (orderInfo.PreSaleId > 0)
                {
                    if (!orderInfo.DepositDate.HasValue)
                    {
                        literal.Visible = true;
                        if (text != "hishop.plugins.payment.podrequest" && num != -2 && orderInfo.FightGroupId == 0)
                        {
                            imageLinkButton.Visible = true;
                        }
                    }
                    else
                    {
                        ProductPreSaleInfo productPreSaleInfo = ProductPreSaleHelper.GetProductPreSaleInfo(orderInfo.PreSaleId);
                        if (productPreSaleInfo.PaymentStartDate <= DateTime.Now && productPreSaleInfo.PaymentEndDate >= DateTime.Now && text != "hishop.plugins.payment.podrequest" && num != -2 && orderInfo.FightGroupId == 0)
                        {
                            imageLinkButton.Visible = true;
                        }
                    }
                }
                else
                {
                    literal.Visible = true;
                    if (text != "hishop.plugins.payment.podrequest" && num != -2 && orderInfo.FightGroupId == 0)
                    {
                        imageLinkButton.Visible = true;
                    }
                }
            }
            if (text == "hishop.plugins.payment.podrequest" && (orderStatus == OrderStatus.WaitBuyerPay || orderStatus == OrderStatus.SellerAlreadySent))
            {
                literal.Visible = true;
            }
            if ((orderStatus == OrderStatus.ApplyForRefund && this.UserStoreId == num4) & flag)
            {
                htmlAnchor2.Visible = true;
            }
            if (num2 > 0)
            {
                string[] source = new string[1]
                {
                    "hishop.plugins.payment.podrequest"
                };
                GroupBuyStatus groupBuyStatus = (GroupBuyStatus)DataBinder.Eval(e.Item.DataItem, "GroupBuyStatus");
                Label          label2         = label;
                int            visible;
                switch (orderStatus)
                {
                case OrderStatus.WaitBuyerPay:
                    if (source.Contains(text))
                    {
                        goto case OrderStatus.BuyerAlreadyPaid;
                    }
                    goto default;

                case OrderStatus.BuyerAlreadyPaid:
                    if (groupBuyStatus == GroupBuyStatus.Success)
                    {
                        visible = ((orderInfo.ItemStatus == OrderItemStatus.Nomarl) ? 1 : 0);
                        break;
                    }
                    goto default;

                default:
                    visible = 0;
                    break;
                }
                label2.Visible = ((byte)visible != 0);
            }
            else
            {
                Label label3 = label;
                int   visible2;
                switch (orderStatus)
                {
                case OrderStatus.WaitBuyerPay:
                    if (text == "hishop.plugins.payment.podrequest")
                    {
                        goto case OrderStatus.BuyerAlreadyPaid;
                    }
                    goto default;

                case OrderStatus.BuyerAlreadyPaid:
                    visible2 = ((orderInfo.ItemStatus == OrderItemStatus.Nomarl) ? 1 : 0);
                    break;

                default:
                    visible2 = 0;
                    break;
                }
                label3.Visible = ((byte)visible2 != 0);
            }
            imageLinkButton2.Visible = (orderStatus == OrderStatus.SellerAlreadySent && orderInfo.ItemStatus == OrderItemStatus.Nomarl);
            HtmlAnchor htmlAnchor3;
            int        visible3;

            if (num == -2)
            {
                htmlAnchor3 = htmlAnchor;
                if ((orderStatus == OrderStatus.BuyerAlreadyPaid || orderStatus == OrderStatus.WaitBuyerPay) && orderInfo.ItemStatus == OrderItemStatus.Nomarl)
                {
                    visible3 = (orderInfo.IsConfirm ? 1 : 0);
                    goto IL_05d6;
                }
                visible3 = 0;
                goto IL_05d6;
            }
            goto IL_0644;
IL_0631:
            int visible4 = (orderInfo.ItemStatus == OrderItemStatus.Nomarl) ? 1 : 0;

            goto IL_063d;
IL_0644:
            LinkButton linkButton = (LinkButton)e.Item.FindControl("lbtnFightGroup");
            Image           image           = (Image)e.Item.FindControl("imgError");
            HtmlInputHidden htmlInputHidden = (HtmlInputHidden)e.Item.FindControl("hidFightGroup");

            image.Visible = orderInfo.IsError;
            if (orderInfo.IsError)
            {
                image.Attributes.Add("title", orderInfo.ErrorMessage);
                image.ImageUrl = "\\Admin\\images\\orderError.png";
            }
            if (orderInfo.FightGroupId > 0)
            {
                FightGroupInfo fightGroup = VShopHelper.GetFightGroup(orderInfo.FightGroupId);
                if (fightGroup != null)
                {
                    if (fightGroup.Status == FightGroupStatus.FightGroupIn && orderInfo.OrderStatus != OrderStatus.WaitBuyerPay && orderInfo.OrderStatus != OrderStatus.Closed)
                    {
                        htmlInputHidden.Value = "1";
                    }
                    else
                    {
                        htmlInputHidden.Value = "0";
                    }
                }
            }
            else
            {
                linkButton.Visible = false;
            }
            return;

IL_05d6:
            htmlAnchor3.Visible = ((byte)visible3 != 0);
            literal.Visible     = (orderStatus == OrderStatus.WaitBuyerPay && orderInfo.ItemStatus == OrderItemStatus.Nomarl);
            label.Visible       = false;
            ImageLinkButton imageLinkButton4 = imageLinkButton3;

            if (!orderInfo.IsConfirm)
            {
                if (orderInfo.OrderStatus == OrderStatus.WaitBuyerPay && (text == "hishop.plugins.payment.podrequest" || orderInfo.PaymentTypeId == -3))
                {
                    goto IL_0631;
                }
                if (orderInfo.OrderStatus == OrderStatus.BuyerAlreadyPaid)
                {
                    goto IL_0631;
                }
            }
            visible4 = 0;
            goto IL_063d;
IL_063d:
            imageLinkButton4.Visible = ((byte)visible4 != 0);
            goto IL_0644;
        }
Esempio n. 14
0
 private void rptOrders_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         HtmlAnchor         htmlAnchor           = (HtmlAnchor)e.Item.FindControl("lkbtnCouponCode");
         HtmlAnchor         htmlAnchor2          = (HtmlAnchor)e.Item.FindControl("lkbtnApplyForRefund");
         HtmlAnchor         htmlAnchor3          = (HtmlAnchor)e.Item.FindControl("lnkClose");
         HtmlAnchor         htmlAnchor4          = (HtmlAnchor)e.Item.FindControl("lkbtnViewMessage");
         HtmlAnchor         htmlAnchor5          = (HtmlAnchor)e.Item.FindControl("lkbtnProductReview");
         Literal            literal              = (Literal)e.Item.FindControl("ltlOrderItems");
         Literal            literal2             = (Literal)e.Item.FindControl("ltlOrderGifts");
         HtmlGenericControl htmlGenericControl   = e.Item.FindControl("panelOperaters") as HtmlGenericControl;
         HtmlGenericControl htmlGenericControl2  = e.Item.FindControl("divToDetail") as HtmlGenericControl;
         HtmlGenericControl htmlGenericControl3  = e.Item.FindControl("divOrderStatus") as HtmlGenericControl;
         HtmlGenericControl htmlGenericControl4  = e.Item.FindControl("divOrderError") as HtmlGenericControl;
         HtmlGenericControl htmlGenericControl5  = e.Item.FindControl("divOrderGifts") as HtmlGenericControl;
         HtmlGenericControl htmlGenericControl6  = e.Item.FindControl("divOrderItems") as HtmlGenericControl;
         HtmlGenericControl htmlGenericControl7  = (HtmlGenericControl)e.Item.FindControl("OrderIdSpan");
         HtmlGenericControl htmlGenericControl8  = (HtmlGenericControl)e.Item.FindControl("PayMoneySpan");
         HtmlGenericControl htmlGenericControl9  = (HtmlGenericControl)e.Item.FindControl("TakeCodeDIV");
         HtmlAnchor         htmlAnchor6          = (HtmlAnchor)e.Item.FindControl("lnkViewLogistics");
         HtmlAnchor         htmlAnchor7          = (HtmlAnchor)e.Item.FindControl("lnkToPay");
         HtmlAnchor         htmlAnchor8          = (HtmlAnchor)e.Item.FindControl("lnkHelpLink");
         HtmlAnchor         htmlAnchor9          = (HtmlAnchor)e.Item.FindControl("lnkFinishOrder");
         HtmlAnchor         htmlAnchor10         = (HtmlAnchor)e.Item.FindControl("lnkViewTakeCodeQRCode");
         HtmlAnchor         htmlAnchor11         = (HtmlAnchor)e.Item.FindControl("lnkCertification");
         HtmlGenericControl htmlGenericControl10 = (HtmlGenericControl)e.Item.FindControl("divSendRedEnvelope");
         OrderStatus        orderStatus          = (OrderStatus)DataBinder.Eval(e.Item.DataItem, "OrderStatus");
         Repeater           repeater             = (Repeater)e.Item.FindControl("Repeater1");
         Repeater           repeater2            = (Repeater)e.Item.FindControl("rptPointGifts");
         this.paymenttypeselect = (Common_WAPPaymentTypeSelect)this.FindControl("paymenttypeselect");
         Literal   literal3  = (Literal)e.Item.FindControl("litGiftTitle");
         string    text      = DataBinder.Eval(e.Item.DataItem, "OrderId").ToString();
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(text);
         if (orderInfo != null)
         {
             if (orderInfo.OrderStatus == OrderStatus.BuyerAlreadyPaid || orderInfo.OrderStatus == OrderStatus.Finished || orderInfo.OrderStatus == OrderStatus.WaitReview || orderInfo.OrderStatus == OrderStatus.History)
             {
                 WeiXinRedEnvelopeInfo openedWeiXinRedEnvelope = WeiXinRedEnvelopeProcessor.GetOpenedWeiXinRedEnvelope();
                 bool visible = false;
                 if (openedWeiXinRedEnvelope != null && openedWeiXinRedEnvelope.EnableIssueMinAmount <= orderInfo.GetPayTotal() && orderInfo.OrderDate >= openedWeiXinRedEnvelope.ActiveStartTime && orderInfo.OrderDate <= openedWeiXinRedEnvelope.ActiveEndTime)
                 {
                     visible = true;
                 }
                 if (htmlGenericControl10 != null)
                 {
                     htmlGenericControl10.Visible = visible;
                     if (this.isVShop)
                     {
                         htmlGenericControl10.InnerHtml = "<a href=\"/vshop/SendRedEnvelope.aspx?OrderId=" + orderInfo.OrderId + "\"></a>";
                     }
                     else
                     {
                         htmlGenericControl10.InnerHtml = "";
                         string text2 = Globals.HttpsFullPath("/vshop/SendRedEnvelope.aspx?OrderId=" + orderInfo.OrderId);
                         htmlGenericControl10.Attributes.Add("onclick", string.Format("ShowMsg('{0}','{1}')", "代金红包请前往微信端领取!", "false"));
                     }
                 }
             }
             this.paymenttypeselect.ClientType = base.ClientType;
             htmlGenericControl4.Visible       = (orderInfo.IsError && orderInfo.CloseReason != "订单已退款完成");
             htmlGenericControl3.Visible       = !orderInfo.IsError;
             htmlGenericControl5.Visible       = (orderInfo.LineItems.Count() == 0);
             htmlGenericControl6.Visible       = (orderInfo.LineItems.Count() > 0);
             htmlAnchor2.HRef   = "ApplyRefund.aspx?OrderId=" + text;
             htmlAnchor.Visible = false;
             htmlAnchor.HRef    = "MemberOrdersVCode?OrderId=" + text;
             HtmlGenericControl htmlGenericControl11 = (HtmlGenericControl)e.Item.FindControl("OrderSupplierH3");
             string             text3 = string.Empty;
             if (htmlGenericControl11 != null)
             {
                 text3 = htmlGenericControl11.Attributes["class"];
                 text3 = ((!string.IsNullOrEmpty(text3)) ? text3.Replace(" ztitle", "").Replace("stitle", "") : "");
             }
             if (orderInfo.OrderStatus != OrderStatus.WaitBuyerPay || !(orderInfo.ParentOrderId == "-1") || !orderInfo.OrderId.Contains("P"))
             {
                 if (HiContext.Current.SiteSettings.OpenMultStore && orderInfo.StoreId > 0 && !string.IsNullOrWhiteSpace(orderInfo.StoreName))
                 {
                     htmlGenericControl7.InnerText = orderInfo.StoreName;
                     text3 += " mtitle";
                 }
                 else if (orderInfo.StoreId == 0 && HiContext.Current.SiteSettings.OpenSupplier && orderInfo.SupplierId > 0)
                 {
                     htmlGenericControl7.InnerText = orderInfo.ShipperName;
                     text3 += " stitle";
                 }
                 else
                 {
                     htmlGenericControl7.InnerText = "平台";
                     text3 += " ztitle";
                 }
                 htmlGenericControl11.Attributes["class"] = text3;
                 if (orderInfo.LineItems.Count <= 0)
                 {
                     literal3.Text = "(礼)";
                 }
             }
             else
             {
                 htmlGenericControl7.InnerText            = orderInfo.OrderId;
                 htmlGenericControl11.Attributes["class"] = text3;
             }
             if (orderInfo.PreSaleId > 0)
             {
                 htmlGenericControl8.InnerText = (orderInfo.Deposit + orderInfo.FinalPayment).F2ToString("f2");
             }
             else
             {
                 htmlGenericControl8.InnerText = Convert.ToDecimal(DataBinder.Eval(e.Item.DataItem, "OrderTotal")).F2ToString("f2");
             }
             if (htmlGenericControl2 != null)
             {
                 if (orderInfo.OrderType == OrderType.ServiceOrder)
                 {
                     htmlGenericControl2.Attributes.Add("onclick", "window.location.href='ServiceMemberOrderDetails.aspx?orderId=" + orderInfo.OrderId + "'");
                 }
                 else
                 {
                     htmlGenericControl2.Attributes.Add("onclick", "window.location.href='MemberOrderDetails.aspx?orderId=" + orderInfo.OrderId + "'");
                 }
             }
             if (htmlAnchor6 != null)
             {
                 if (orderInfo.OrderStatus == OrderStatus.SellerAlreadySent || orderInfo.OrderStatus == OrderStatus.Finished)
                 {
                     if (!string.IsNullOrEmpty(orderInfo.ExpressCompanyAbb) && !string.IsNullOrEmpty(orderInfo.ShipOrderNumber))
                     {
                         htmlAnchor6.HRef = "MyLogistics.aspx?OrderId=" + text;
                     }
                     else if (orderInfo.ExpressCompanyName == "同城物流配送")
                     {
                         htmlAnchor6.HRef = "MyLogistics.aspx?OrderId=" + text;
                     }
                     else
                     {
                         htmlAnchor6.Visible = false;
                     }
                 }
                 else
                 {
                     htmlAnchor6.Visible = false;
                 }
             }
             if (htmlAnchor10 != null)
             {
                 htmlAnchor10.HRef = "ViewQRCode.aspx?orderId=" + orderInfo.OrderId;
             }
             int num4;
             if (htmlAnchor5 != null && ((orderStatus == OrderStatus.Finished && orderInfo.LineItems.Count > 0) || (orderStatus == OrderStatus.Closed && orderInfo.OnlyReturnedCount == orderInfo.LineItems.Count && orderInfo.LineItems.Count > 0)))
             {
                 htmlAnchor5.Visible = true;
                 htmlAnchor5.HRef    = "MemberSubmitProductReview.aspx?orderId=" + text;
                 DataTable    productReviewAll = ProductBrowser.GetProductReviewAll(text);
                 LineItemInfo lineItemInfo     = new LineItemInfo();
                 int          num  = 0;
                 int          num2 = 0;
                 int          num3 = 0;
                 bool         flag = false;
                 foreach (KeyValuePair <string, LineItemInfo> lineItem in orderInfo.LineItems)
                 {
                     flag         = false;
                     lineItemInfo = lineItem.Value;
                     for (int i = 0; i < productReviewAll.Rows.Count; i++)
                     {
                         num4 = lineItemInfo.ProductId;
                         if (num4.ToString() == productReviewAll.Rows[i][0].ToString() && lineItemInfo.SkuId.ToString().Trim() == productReviewAll.Rows[i][1].ToString().Trim())
                         {
                             flag = true;
                         }
                     }
                     if (!flag)
                     {
                         num2++;
                     }
                     else
                     {
                         num3++;
                     }
                 }
                 if (num + num2 == orderInfo.LineItems.Count)
                 {
                     htmlAnchor5.InnerText = "查看评论";
                 }
                 else
                 {
                     SiteSettings masterSettings = SettingsManager.GetMasterSettings();
                     if (masterSettings != null)
                     {
                         if (masterSettings.ProductCommentPoint <= 0)
                         {
                             htmlAnchor5.InnerText = "评价";
                         }
                         else
                         {
                             htmlAnchor5.InnerText = $"评价得{num3 * masterSettings.ProductCommentPoint}积分";
                         }
                     }
                 }
             }
             if (htmlAnchor3 != null && orderStatus == OrderStatus.WaitBuyerPay)
             {
                 if (orderInfo.PreSaleId == 0 || (orderInfo.PreSaleId > 0 && !orderInfo.DepositDate.HasValue))
                 {
                     htmlAnchor3.Visible = true;
                 }
                 htmlAnchor3.Attributes.Add("onclick", $"closeOrder('{text}')");
             }
             DateTime dateTime;
             if (htmlAnchor7 != null)
             {
                 if (orderStatus == OrderStatus.WaitBuyerPay && orderInfo.ItemStatus == OrderItemStatus.Nomarl && orderInfo.PaymentTypeId != -3 && orderInfo.Gateway != "hishop.plugins.payment.bankrequest" && orderInfo.Gateway != "hishop.plugins.payment.podrequest")
                 {
                     htmlAnchor7.Attributes.Add("IsServiceOrder", (orderInfo.OrderType == OrderType.ServiceOrder).ToString().ToLower());
                     if (orderInfo.PreSaleId > 0)
                     {
                         ProductPreSaleInfo productPreSaleInfo = ProductPreSaleHelper.GetProductPreSaleInfo(orderInfo.PreSaleId);
                         if (!orderInfo.DepositDate.HasValue)
                         {
                             htmlGenericControl8.InnerText = orderInfo.Deposit.F2ToString("f2");
                             (e.Item.FindControl("sptotal") as HtmlGenericControl).InnerText = "定金:¥";
                             if (productPreSaleInfo.PreSaleEndDate > DateTime.Now)
                             {
                                 AttributeCollection attributes = htmlAnchor7.Attributes;
                                 num4 = orderInfo.PaymentTypeId;
                                 attributes.Add("PaymentTypeId", num4.ToString());
                                 htmlAnchor7.Attributes.Add("OrderId", orderInfo.OrderId);
                                 htmlAnchor7.Attributes.Add("OrderTotal", orderInfo.Deposit.F2ToString("f2"));
                                 AttributeCollection attributes2 = htmlAnchor7.Attributes;
                                 num4 = orderInfo.FightGroupId;
                                 attributes2.Add("FightGroupId", num4.ToString());
                             }
                             else
                             {
                                 htmlAnchor7.Visible = false;
                                 (e.Item.FindControl("sptotal") as HtmlGenericControl).InnerText = "定金:¥";
                             }
                         }
                         else if (productPreSaleInfo.PaymentStartDate > DateTime.Now || productPreSaleInfo.PaymentEndDate < DateTime.Now)
                         {
                             (e.Item.FindControl("sptotal") as HtmlGenericControl).InnerText = "尾款:¥";
                             htmlGenericControl8.InnerText = orderInfo.FinalPayment.F2ToString("f2");
                             htmlAnchor7.Visible           = false;
                             htmlAnchor3.Visible           = false;
                             if (productPreSaleInfo.PaymentEndDate < DateTime.Now)
                             {
                                 (e.Item.FindControl("sptotal") as HtmlGenericControl).InnerText = "尾款支付结束";
                                 htmlGenericControl8.Visible = false;
                             }
                         }
                         else
                         {
                             AttributeCollection attributes3 = htmlAnchor7.Attributes;
                             num4 = orderInfo.PaymentTypeId;
                             attributes3.Add("PaymentTypeId", num4.ToString());
                             htmlAnchor7.Attributes.Add("OrderId", orderInfo.OrderId);
                             htmlAnchor7.Attributes.Add("OrderTotal", orderInfo.FinalPayment.F2ToString("f2"));
                             AttributeCollection attributes4 = htmlAnchor7.Attributes;
                             num4 = orderInfo.FightGroupId;
                             attributes4.Add("FightGroupId", num4.ToString());
                             htmlGenericControl8.InnerText = orderInfo.FinalPayment.F2ToString("f2");
                             (e.Item.FindControl("sptotal") as HtmlGenericControl).InnerText = "尾款:¥";
                             htmlAnchor3.Visible = false;
                         }
                     }
                     else
                     {
                         AttributeCollection attributes5 = htmlAnchor7.Attributes;
                         num4 = orderInfo.PaymentTypeId;
                         attributes5.Add("PaymentTypeId", num4.ToString());
                         htmlAnchor7.Attributes.Add("OrderId", orderInfo.OrderId);
                         htmlAnchor7.Attributes.Add("OrderTotal", orderInfo.GetTotal(false).F2ToString("f2"));
                         AttributeCollection attributes6 = htmlAnchor7.Attributes;
                         num4 = orderInfo.FightGroupId;
                         attributes6.Add("FightGroupId", num4.ToString());
                         if (HiContext.Current.SiteSettings.OpenMultStore && orderInfo.StoreId > 0 && !SettingsManager.GetMasterSettings().Store_IsOrderInClosingTime)
                         {
                             StoresInfo storeById = StoresHelper.GetStoreById(orderInfo.StoreId);
                             dateTime = DateTime.Now;
                             string str = dateTime.ToString("yyyy-MM-dd");
                             dateTime = storeById.OpenStartDate;
                             DateTime value = (str + " " + dateTime.ToString("HH:mm")).ToDateTime().Value;
                             dateTime = DateTime.Now;
                             string str2 = dateTime.ToString("yyyy-MM-dd");
                             dateTime = storeById.OpenEndDate;
                             DateTime dateTime2 = (str2 + " " + dateTime.ToString("HH:mm")).ToDateTime().Value;
                             if (dateTime2 <= value)
                             {
                                 dateTime2 = dateTime2.AddDays(1.0);
                             }
                             if (DateTime.Now < value || DateTime.Now > dateTime2)
                             {
                                 htmlAnchor7.Attributes.Add("NeedNotInTimeTip", "1");
                             }
                         }
                     }
                 }
                 else
                 {
                     htmlAnchor7.Visible = false;
                 }
             }
             if (htmlAnchor8 != null)
             {
                 if (orderInfo.Gateway == "hishop.plugins.payment.bankrequest" && orderInfo.OrderStatus == OrderStatus.WaitBuyerPay)
                 {
                     htmlAnchor8.HRef = "FinishOrder.aspx?OrderId=" + text + "&onlyHelp=true";
                 }
                 else
                 {
                     htmlAnchor8.Visible = false;
                 }
             }
             if (htmlAnchor9 != null)
             {
                 if (orderInfo.OrderStatus == OrderStatus.SellerAlreadySent && orderInfo.ItemStatus == OrderItemStatus.Nomarl)
                 {
                     htmlAnchor9.Attributes.Add("onclick", $"FinishOrder('{text}','{orderInfo.PaymentType}',{orderInfo.LineItems.Count})");
                 }
                 else
                 {
                     htmlAnchor9.Visible = false;
                 }
             }
             if (htmlAnchor11 != null)
             {
                 if (HiContext.Current.SiteSettings.IsOpenCertification && orderInfo.IDStatus == 0 && orderInfo.IsincludeCrossBorderGoods)
                 {
                     htmlAnchor11.Attributes.Add("orderId", orderInfo.OrderId);
                     htmlAnchor11.Attributes.Add("onclick", "Certification(this)");
                     htmlAnchor11.Visible = true;
                 }
                 else
                 {
                     htmlAnchor11.Visible = false;
                 }
             }
             if (literal != null)
             {
                 Literal literal4 = literal;
                 num4          = this.GetGoodsNum(orderInfo);
                 literal4.Text = num4.ToString();
             }
             if (literal2 != null)
             {
                 Literal literal5 = literal2;
                 num4          = this.GetGiftsNum(orderInfo);
                 literal5.Text = num4.ToString();
             }
             if (orderInfo.OrderType == OrderType.ServiceOrder)
             {
                 Label label = (Label)e.Item.FindControl("OrderStatusLabel2");
                 IList <OrderVerificationItemInfo> orderVerificationItems = TradeHelper.GetOrderVerificationItems(orderInfo.OrderId);
                 ServiceOrderStatus orderStatus2 = this.GetOrderStatus(orderInfo, orderVerificationItems);
                 label.Text    = ((Enum)(object)orderStatus2).ToDescription();
                 label.Visible = true;
             }
             else
             {
                 OrderStatusLabel orderStatusLabel = (OrderStatusLabel)e.Item.FindControl("OrderStatusLabel1");
                 orderStatusLabel.OrderItemStatus    = ((orderInfo.ItemStatus != 0) ? OrderItemStatus.HasReturnOrReplace : OrderItemStatus.Nomarl);
                 orderStatusLabel.Gateway            = orderInfo.Gateway;
                 orderStatusLabel.OrderStatusCode    = orderInfo.OrderStatus;
                 orderStatusLabel.ShipmentModelId    = orderInfo.ShippingModeId;
                 orderStatusLabel.IsConfirm          = orderInfo.IsConfirm;
                 orderStatusLabel.ShipmentModelId    = orderInfo.ShippingModeId;
                 orderStatusLabel.PaymentTypeId      = orderInfo.PaymentTypeId;
                 orderStatusLabel.PreSaleId          = orderInfo.PreSaleId;
                 orderStatusLabel.DepositDate        = orderInfo.DepositDate;
                 orderStatusLabel.OrderType          = orderInfo.OrderType;
                 orderStatusLabel.ExpressCompanyName = orderInfo.ExpressCompanyName;
                 orderStatusLabel.DadaStatus         = orderInfo.DadaStatus;
                 orderStatusLabel.Visible            = true;
             }
             Dictionary <string, LineItemInfo> lineItems = orderInfo.LineItems;
             foreach (string key in lineItems.Keys)
             {
                 lineItems[key].IsValid = (orderInfo.OrderType == OrderType.ServiceOrder);
             }
             repeater.DataSource     = lineItems.Values;
             repeater.ItemDataBound += this.Repeater1_ItemDataBound;
             repeater.DataBind();
             if (orderInfo.LineItems.Count == 0)
             {
                 IEnumerable <OrderGiftInfo> enumerable = from a in orderInfo.Gifts
                                                          where a.PromoteType == 0 || a.PromoteType == 15
                                                          select a;
                 foreach (OrderGiftInfo item in enumerable)
                 {
                     item.NeedPoint = ((orderInfo.OrderType == OrderType.ServiceOrder) ? 1 : 0);
                 }
                 repeater2.DataSource     = enumerable;
                 repeater2.ItemDataBound += this.rptPointGifts_ItemDataBound;
                 repeater2.DataBind();
             }
             OrderItemStatus itemStatus = orderInfo.ItemStatus;
             DateTime        obj;
             if (DataBinder.Eval(e.Item.DataItem, "FinishDate") != DBNull.Value)
             {
                 obj = (DateTime)DataBinder.Eval(e.Item.DataItem, "FinishDate");
             }
             else
             {
                 dateTime = DateTime.Now;
                 obj      = dateTime.AddYears(-1);
             }
             DateTime dateTime3 = obj;
             string   text4     = "";
             if (DataBinder.Eval(e.Item.DataItem, "Gateway") != null && !(DataBinder.Eval(e.Item.DataItem, "Gateway") is DBNull))
             {
                 text4 = (string)DataBinder.Eval(e.Item.DataItem, "Gateway");
             }
             RefundInfo refundInfo = TradeHelper.GetRefundInfo(text);
             if (htmlAnchor2 != null)
             {
                 if (orderInfo.OrderType == OrderType.ServiceOrder)
                 {
                     htmlAnchor2.Visible = (orderStatus == OrderStatus.BuyerAlreadyPaid && orderInfo.ItemStatus == OrderItemStatus.Nomarl && orderInfo.LineItems.Count != 0);
                     if (htmlAnchor2.Visible)
                     {
                         LineItemInfo value2 = orderInfo.LineItems.FirstOrDefault().Value;
                         if (value2.IsRefund)
                         {
                             if (value2.IsOverRefund)
                             {
                                 htmlAnchor2.Visible = true;
                             }
                             else if (value2.IsValid)
                             {
                                 htmlAnchor2.Visible = true;
                             }
                             else if (DateTime.Now >= value2.ValidStartDate.Value && DateTime.Now <= value2.ValidEndDate.Value)
                             {
                                 htmlAnchor2.Visible = true;
                             }
                             else
                             {
                                 htmlAnchor2.Visible = false;
                             }
                         }
                         else
                         {
                             htmlAnchor2.Visible = false;
                         }
                     }
                 }
                 else
                 {
                     htmlAnchor2.Visible = (orderStatus == OrderStatus.BuyerAlreadyPaid && orderInfo.ItemStatus == OrderItemStatus.Nomarl && orderInfo.LineItems.Count != 0 && orderInfo.GetPayTotal() > decimal.Zero);
                 }
             }
             if (htmlAnchor != null)
             {
                 htmlAnchor.Visible = (orderInfo.OrderType == OrderType.ServiceOrder && orderInfo.OrderStatus == OrderStatus.BuyerAlreadyPaid);
             }
             SiteSettings masterSettings2 = SettingsManager.GetMasterSettings();
             if (!string.IsNullOrEmpty(orderInfo.TakeCode) && (orderInfo.OrderStatus == OrderStatus.BuyerAlreadyPaid || orderInfo.OrderStatus == OrderStatus.WaitBuyerPay))
             {
                 htmlAnchor10.Visible = true;
             }
             if (!htmlAnchor2.Visible && !htmlAnchor4.Visible && !htmlAnchor10.Visible && !htmlAnchor6.Visible && !htmlAnchor3.Visible && !htmlAnchor7.Visible && !htmlAnchor8.Visible && !htmlAnchor9.Visible && !htmlAnchor5.Visible && !htmlAnchor.Visible)
             {
                 htmlGenericControl.Visible = false;
             }
             if (orderInfo.FightGroupId > 0)
             {
                 FightGroupInfo fightGroup = VShopHelper.GetFightGroup(orderInfo.FightGroupId);
                 if (fightGroup != null)
                 {
                     htmlAnchor2.Visible = (fightGroup.Status != 0 && orderInfo.GetPayTotal() > decimal.Zero && (refundInfo == null || refundInfo.HandleStatus == RefundStatus.Refused) && orderInfo.OrderStatus == OrderStatus.BuyerAlreadyPaid);
                 }
             }
         }
     }
 }
Esempio n. 15
0
 protected override void AttachChildControls()
 {
     this.orderId             = this.Page.Request.QueryString["orderId"];
     this.litOrderId          = (Literal)this.FindControl("litOrderId");
     this.lbltotalPrice       = (FormatedMoneyLabel)this.FindControl("lbltotalPrice");
     this.litAddDate          = (FormatedTimeLabel)this.FindControl("litAddDate");
     this.lblOrderStatus      = (OrderStatusLabel)this.FindControl("lblOrderStatus");
     this.litCloseReason      = (Literal)this.FindControl("litCloseReason");
     this.litRemark           = (Literal)this.FindControl("litRemark");
     this.litShipTo           = (Literal)this.FindControl("litShipTo");
     this.litRegion           = (Literal)this.FindControl("litRegion");
     this.litAddress          = (Literal)this.FindControl("litAddress");
     this.litZipcode          = (Literal)this.FindControl("litZipcode");
     this.litEmail            = (Literal)this.FindControl("litEmail");
     this.litPhone            = (Literal)this.FindControl("litPhone");
     this.litTellPhone        = (Literal)this.FindControl("litTellPhone");
     this.litUserName         = (Literal)this.FindControl("litUserName");
     this.litUserAddress      = (Literal)this.FindControl("litUserAddress");
     this.litUserEmail        = (Literal)this.FindControl("litUserEmail");
     this.litUserPhone        = (Literal)this.FindControl("litUserPhone");
     this.litUserTellPhone    = (Literal)this.FindControl("litUserTellPhone");
     this.litUserQQ           = (Literal)this.FindControl("litUserQQ");
     this.litUserMSN          = (Literal)this.FindControl("litUserMSN");
     this.litPaymentType      = (Literal)this.FindControl("litPaymentType");
     this.litModeName         = (Literal)this.FindControl("litModeName");
     this.plOrderOption       = (Panel)this.FindControl("plOrderOption");
     this.grdOrderOption      = (GridView)this.FindControl("grdOrderOption");
     this.plOrderSended       = (Panel)this.FindControl("plOrderSended");
     this.litRealModeName     = (Literal)this.FindControl("litRealModeName");
     this.litShippNumber      = (Literal)this.FindControl("litShippNumber");
     this.litDiscountName     = (HyperLink)this.FindControl("litDiscountName");
     this.lblAdjustedDiscount = (FormatedMoneyLabel)this.FindControl("lblAdjustedDiscount");
     this.litFreeName         = (HyperLink)this.FindControl("litFreeName");
     this.plExpress           = (Panel)this.FindControl("plExpress");
     this.power                = (HtmlAnchor)this.FindControl("power");
     this.orderItems           = (Common_OrderManage_OrderItems)this.FindControl("Common_OrderManage_OrderItems");
     this.grdOrderGift         = (GridView)this.FindControl("grdOrderGift");
     this.plOrderGift          = (Panel)this.FindControl("plOrderGift");
     this.lblCartMoney         = (FormatedMoneyLabel)this.FindControl("lblCartMoney");
     this.litPoints            = (Literal)this.FindControl("litPoints");
     this.litWeight            = (Literal)this.FindControl("litWeight");
     this.litFree              = (Literal)this.FindControl("litFree");
     this.lblFreight           = (FormatedMoneyLabel)this.FindControl("lblFreight");
     this.lblPayCharge         = (FormatedMoneyLabel)this.FindControl("lblPayCharge");
     this.lblOptionPrice       = (FormatedMoneyLabel)this.FindControl("lblOptionPrice");
     this.litCouponValue       = (Literal)this.FindControl("litCouponValue");
     this.lblDiscount          = (FormatedMoneyLabel)this.FindControl("lblDiscount");
     this.litTotalPrice        = (FormatedMoneyLabel)this.FindControl("litTotalPrice");
     this.plRefund             = (Panel)this.FindControl("plRefund");
     this.lblTotalBalance      = (FormatedMoneyLabel)this.FindControl("lblTotalBalance");
     this.litRefundOrderRemark = (Literal)this.FindControl("litRefundOrderRemark");
     PageTitle.AddTitle("订单详细页", HiContext.Current.Context);
     if (!this.Page.IsPostBack)
     {
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         this.BindOrderBase(orderInfo);
         this.BindOrderAddress(orderInfo);
         this.BindOrderItems(orderInfo);
         this.BindOrderRefund(orderInfo);
     }
 }
Esempio n. 16
0
        protected void listOrders_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                OrderStatus orderStatus = (OrderStatus)DataBinder.Eval(e.Item.DataItem, "OrderStatus");
                string      text        = DataBinder.Eval(e.Item.DataItem, "OrderId").ToString();
                OrderInfo   orderInfo   = TradeHelper.GetOrderInfo(text);
                if (orderInfo != null)
                {
                    if (orderInfo.PreSaleId > 0)
                    {
                        Literal literal = (Literal)e.Item.FindControl("litPresale");
                        literal.Text    = "(预售)";
                        literal.Visible = true;
                    }
                    OrderItemStatus itemStatus = orderInfo.ItemStatus;
                    DateTime        dateTime   = (DataBinder.Eval(e.Item.DataItem, "FinishDate") == DBNull.Value) ? DateTime.Now.AddYears(-1) : ((DateTime)DataBinder.Eval(e.Item.DataItem, "FinishDate"));
                    string          text2      = "";
                    if (DataBinder.Eval(e.Item.DataItem, "Gateway") != null && !(DataBinder.Eval(e.Item.DataItem, "Gateway") is DBNull))
                    {
                        text2 = (string)DataBinder.Eval(e.Item.DataItem, "Gateway");
                    }
                    HyperLink       hyperLink        = (HyperLink)e.Item.FindControl("hplinkorderreview");
                    HtmlAnchor      htmlAnchor       = (HtmlAnchor)e.Item.FindControl("hlinkPay");
                    ImageLinkButton imageLinkButton  = (ImageLinkButton)e.Item.FindControl("lkbtnConfirmOrder");
                    ImageLinkButton imageLinkButton2 = (ImageLinkButton)e.Item.FindControl("lkbtnCloseOrder");
                    HtmlAnchor      htmlAnchor2      = (HtmlAnchor)e.Item.FindControl("lkbtnApplyForRefund");
                    HtmlAnchor      htmlAnchor3      = (HtmlAnchor)e.Item.FindControl("lkbtnUserRealNameVerify");
                    HyperLink       hyperLink2       = (HyperLink)e.Item.FindControl("hlinkOrderDetails");
                    Repeater        repeater         = (Repeater)e.Item.FindControl("rpProduct");
                    Repeater        repeater2        = (Repeater)e.Item.FindControl("rpGift");
                    Label           label            = (Label)e.Item.FindControl("Logistics");
                    HtmlAnchor      htmlAnchor4      = (HtmlAnchor)e.Item.FindControl("lkbtnViewMessage");
                    HtmlAnchor      htmlAnchor5      = (HtmlAnchor)e.Item.FindControl("lkbtnRefundDetail");
                    htmlAnchor2.Attributes.Add("OrderId", text);
                    htmlAnchor2.Attributes.Add("SkuId", "");
                    htmlAnchor2.Attributes.Add("GateWay", text2);
                    OrderStatusLabel orderStatusLabel = (OrderStatusLabel)e.Item.FindControl("lblOrderStatus");
                    Literal          literal2         = (Literal)e.Item.FindControl("lblGiftTitle");
                    orderStatusLabel.order = orderInfo;
                    if (orderInfo.LineItems.Count <= 0)
                    {
                        Literal literal3 = literal2;
                        literal3.Text += "(礼)";
                    }
                    if (hyperLink != null)
                    {
                        if (orderInfo.GetGiftQuantity() > 0 && orderInfo.LineItems.Count() == 0)
                        {
                            hyperLink.Visible = false;
                        }
                        else
                        {
                            HyperLink hyperLink3 = hyperLink;
                            int       visible;
                            switch (orderStatus)
                            {
                            case OrderStatus.Closed:
                                visible = ((orderInfo.OnlyReturnedCount == orderInfo.LineItems.Count) ? 1 : 0);
                                break;

                            default:
                                visible = 0;
                                break;

                            case OrderStatus.Finished:
                                visible = 1;
                                break;
                            }
                            hyperLink3.Visible = ((byte)visible != 0);
                            if (hyperLink.Visible)
                            {
                                DataTable    productReviewAll = ProductBrowser.GetProductReviewAll(orderInfo.OrderId);
                                LineItemInfo lineItemInfo     = new LineItemInfo();
                                int          num  = 0;
                                int          num2 = 0;
                                int          num3 = 0;
                                bool         flag = false;
                                foreach (KeyValuePair <string, LineItemInfo> lineItem in orderInfo.LineItems)
                                {
                                    flag         = false;
                                    lineItemInfo = lineItem.Value;
                                    for (int i = 0; i < productReviewAll.Rows.Count; i++)
                                    {
                                        if (lineItemInfo.ProductId.ToString() == productReviewAll.Rows[i][0].ToString() && lineItemInfo.SkuId.ToString().Trim() == productReviewAll.Rows[i][1].ToString().Trim())
                                        {
                                            flag = true;
                                        }
                                    }
                                    if (!flag)
                                    {
                                        num2++;
                                    }
                                    else
                                    {
                                        num3++;
                                    }
                                }
                                if (num + num2 == orderInfo.LineItems.Count)
                                {
                                    hyperLink.Text = "查看评论";
                                }
                                else
                                {
                                    SiteSettings masterSettings = SettingsManager.GetMasterSettings();
                                    if (masterSettings != null)
                                    {
                                        if (masterSettings.ProductCommentPoint <= 0)
                                        {
                                            hyperLink.Text = "评价";
                                        }
                                        else
                                        {
                                            hyperLink.Text = $"评价得{num3 * masterSettings.ProductCommentPoint}积分";
                                        }
                                    }
                                }
                            }
                        }
                    }
                    if (orderInfo.PreSaleId > 0)
                    {
                        FormatedMoneyLabel formatedMoneyLabel = (FormatedMoneyLabel)e.Item.FindControl("FormatedMoneyLabel2");
                        formatedMoneyLabel.Money = orderInfo.Deposit + orderInfo.FinalPayment;
                        formatedMoneyLabel.Text  = (orderInfo.Deposit + orderInfo.FinalPayment).F2ToString("f2");
                        if (orderStatus == OrderStatus.WaitBuyerPay && text2 != "hishop.plugins.payment.podrequest" && text2 != "hishop.plugins.payment.bankrequest" && orderInfo.PaymentTypeId != -3)
                        {
                            if (!orderInfo.DepositDate.HasValue)
                            {
                                htmlAnchor.Visible = true;
                            }
                            else if (orderInfo.DepositDate.HasValue)
                            {
                                ProductPreSaleInfo productPreSaleInfo = ProductPreSaleHelper.GetProductPreSaleInfo(orderInfo.PreSaleId);
                                if (productPreSaleInfo.PaymentStartDate <= DateTime.Now && DateTime.Now <= productPreSaleInfo.PaymentEndDate)
                                {
                                    htmlAnchor.Visible = true;
                                }
                                else
                                {
                                    htmlAnchor.Visible = false;
                                }
                            }
                            else
                            {
                                htmlAnchor.Visible = false;
                            }
                        }
                        else
                        {
                            htmlAnchor.Visible = false;
                        }
                    }
                    else
                    {
                        htmlAnchor.Visible = (orderStatus == OrderStatus.WaitBuyerPay && text2 != "hishop.plugins.payment.podrequest" && text2 != "hishop.plugins.payment.bankrequest" && orderInfo.PaymentTypeId != -3);
                    }
                    imageLinkButton.Visible = (orderStatus == OrderStatus.SellerAlreadySent && itemStatus == OrderItemStatus.Nomarl);
                    if (orderInfo.PreSaleId > 0)
                    {
                        imageLinkButton2.Visible = (orderStatus == OrderStatus.WaitBuyerPay && itemStatus == OrderItemStatus.Nomarl && !orderInfo.DepositDate.HasValue);
                    }
                    else
                    {
                        imageLinkButton2.Visible = (orderStatus == OrderStatus.WaitBuyerPay && itemStatus == OrderItemStatus.Nomarl);
                    }
                    RefundInfo refundInfo = TradeHelper.GetRefundInfo(text);
                    htmlAnchor2.Visible = ((orderInfo.FightGroupId > 0 && VShopHelper.IsFightGroupCanRefund(orderInfo.FightGroupId) && orderInfo.IsCanRefund) || (orderInfo.FightGroupId <= 0 && orderInfo.IsCanRefund));
                    htmlAnchor3.Visible = (HiContext.Current.SiteSettings.IsOpenCertification && orderInfo.IDStatus == 0 && orderInfo.IsincludeCrossBorderGoods);
                    if (htmlAnchor3.Visible)
                    {
                        htmlAnchor3.Attributes.Add("OrderId", text);
                    }
                    if (repeater != null && repeater2 != null)
                    {
                        repeater.ItemDataBound += this.listProduct_ItemDataBound;
                        IList <NewLineItemInfo> list = new List <NewLineItemInfo>();
                        foreach (LineItemInfo value in orderInfo.LineItems.Values)
                        {
                            NewLineItemInfo newLineItemInfo = this.GetNewLineItemInfo(value, orderInfo.OrderId);
                            list.Add(newLineItemInfo);
                        }
                        if (list == null || list.Count == 0)
                        {
                            repeater.Visible = false;
                            DataTable dataTable = (DataTable)(repeater2.DataSource = TradeHelper.GetOrderGiftsThumbnailsUrl(((DataRowView)e.Item.DataItem).Row["OrderId"].ToString()));
                            repeater2.DataBind();
                            repeater2.Visible = true;
                        }
                        else
                        {
                            repeater.DataSource = list;
                            repeater.DataBind();
                            repeater2.Visible = false;
                            repeater.Visible  = true;
                        }
                    }
                    if (refundInfo != null && orderInfo.ItemStatus == OrderItemStatus.Nomarl && (orderInfo.OrderStatus == OrderStatus.ApplyForRefund || orderInfo.OrderStatus == OrderStatus.RefundRefused || orderInfo.OrderStatus == OrderStatus.Closed))
                    {
                        htmlAnchor5.HRef    = "/user/UserRefundApplyDetails/" + refundInfo.RefundId;
                        htmlAnchor5.Visible = true;
                    }
                    hyperLink2.NavigateUrl = "/user/OrderDetails/" + orderInfo.OrderId;
                    if ((orderStatus == OrderStatus.SellerAlreadySent || orderStatus == OrderStatus.Finished) && !string.IsNullOrEmpty(orderInfo.ExpressCompanyAbb) && !string.IsNullOrEmpty(orderInfo.ShipOrderNumber) && orderInfo.ShippingModeId != -2)
                    {
                        label.Attributes.Add("action", "order");
                        label.Attributes.Add("orderId", text);
                        label.Visible = true;
                    }
                    if (orderInfo.FightGroupId > 0)
                    {
                        FightGroupInfo fightGroup = VShopHelper.GetFightGroup(orderInfo.FightGroupId);
                        htmlAnchor2.Visible = (fightGroup.Status != 0 && orderInfo.GetPayTotal() > decimal.Zero && (refundInfo == null || refundInfo.HandleStatus == RefundStatus.Refused) && orderInfo.OrderStatus == OrderStatus.BuyerAlreadyPaid);
                    }
                    if (orderInfo.OrderStatus == OrderStatus.BuyerAlreadyPaid || orderInfo.OrderStatus == OrderStatus.Finished || orderInfo.OrderStatus == OrderStatus.WaitReview || orderInfo.OrderStatus == OrderStatus.History)
                    {
                        WeiXinRedEnvelopeInfo openedWeiXinRedEnvelope = WeiXinRedEnvelopeProcessor.GetOpenedWeiXinRedEnvelope();
                        bool flag2 = false;
                        if (openedWeiXinRedEnvelope != null && openedWeiXinRedEnvelope.EnableIssueMinAmount <= orderInfo.GetPayTotal() && orderInfo.OrderDate >= openedWeiXinRedEnvelope.ActiveStartTime && orderInfo.OrderDate <= openedWeiXinRedEnvelope.ActiveEndTime)
                        {
                            flag2 = true;
                        }
                        if (flag2)
                        {
                            Image image = (Image)e.Item.FindControl("imgRedEnvelope");
                            image.ImageUrl = "../../../../common/images/SendRedEnvelope.png";
                            image.Attributes.Add("class", "ztitle_RedEnvelope");
                            image.Attributes.Add("onclick", "GetRedEnvelope(" + orderInfo.OrderId + ")");
                            image.Visible = true;
                        }
                    }
                    if (orderInfo.OrderStatus != OrderStatus.WaitBuyerPay || !(orderInfo.ParentOrderId == "-1") || !orderInfo.OrderId.Contains("P"))
                    {
                        Label label2 = (Label)e.Item.FindControl("lblsupplier");
                        if (label2 != null)
                        {
                            string empty = string.Empty;
                            if (HiContext.Current.SiteSettings.OpenMultStore && orderInfo.StoreId > 0 && !string.IsNullOrWhiteSpace(orderInfo.StoreName))
                            {
                                label2.Text = orderInfo.StoreName;
                                empty       = "mtitle_1";
                            }
                            else if (orderInfo.StoreId == 0 && HiContext.Current.SiteSettings.OpenSupplier && orderInfo.SupplierId > 0)
                            {
                                label2.Text = orderInfo.ShipperName;
                                empty       = "stitle_1";
                            }
                            else
                            {
                                label2.Text = "平台";
                                empty       = "ztitle_1_new";
                            }
                            label2.Attributes.Add("style", string.IsNullOrWhiteSpace(label2.Text) ? "display:none" : "display:inline");
                            label2.Attributes.Add("class", empty);
                            label2.Visible = true;
                        }
                    }
                }
            }
        }
Esempio n. 17
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;
            }
        }
Esempio n. 18
0
        private void dlstOrders_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                SiteSettings masterSettings = SettingsManager.GetMasterSettings();
                string       text           = "";
                if (!(DataBinder.Eval(e.Item.DataItem, "Gateway") is DBNull))
                {
                    text = (string)DataBinder.Eval(e.Item.DataItem, "Gateway");
                }
                string          orderId         = DataBinder.Eval(e.Item.DataItem, "OrderId").ToString();
                OrderInfo       orderInfo       = TradeHelper.GetOrderInfo(orderId);
                OrderStatus     orderStatus     = (OrderStatus)DataBinder.Eval(e.Item.DataItem, "OrderStatus");
                int             num             = DataBinder.Eval(e.Item.DataItem, "ShippingModeId").ToInt(0);
                int             num2            = (int)((DataBinder.Eval(e.Item.DataItem, "GroupBuyId") is DBNull) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "GroupBuyId"));
                int             num3            = (int)((DataBinder.Eval(e.Item.DataItem, "CountDownBuyId") is DBNull) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "CountDownBuyId"));
                int             num4            = (int)((DataBinder.Eval(e.Item.DataItem, "BundlingId") is DBNull) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "BundlingId"));
                int             num5            = DataBinder.Eval(e.Item.DataItem, "ShippingModeId").ToInt(0);
                Label           label           = (Label)e.Item.FindControl("lkbtnSendGoods");
                Literal         literal         = (Literal)e.Item.FindControl("isGiftOrder");
                LinkButton      linkButton      = (LinkButton)e.Item.FindControl("lbtnFightGroup");
                Image           image           = (Image)e.Item.FindControl("imgError");
                HtmlInputHidden htmlInputHidden = (HtmlInputHidden)e.Item.FindControl("hidFightGroup");
                HtmlAnchor      htmlAnchor      = (HtmlAnchor)e.Item.FindControl("aftersaleImg");
                image.Visible = orderInfo.IsError;
                if (orderInfo.IsError)
                {
                    image.Attributes.Add("title", orderInfo.ErrorMessage);
                    image.ImageUrl = "\\Supplier\\images\\orderError.png";
                }
                if (orderInfo.ItemStatus != 0 || orderInfo.OrderStatus == OrderStatus.ApplyForRefund)
                {
                    if (orderInfo.OrderStatus == OrderStatus.ApplyForRefund)
                    {
                        RefundInfo refundInfo = TradeHelper.GetRefundInfo(orderInfo.OrderId);
                        if (refundInfo != null)
                        {
                            htmlAnchor.Visible = true;
                            htmlAnchor.Title   = "订单已申请退款";
                        }
                    }
                    else
                    {
                        int            num6           = 0;
                        AfterSaleTypes afterSaleTypes = AfterSaleTypes.ReturnAndRefund;
                        int            num7           = 0;
                        foreach (LineItemInfo value in orderInfo.LineItems.Values)
                        {
                            if (value.ReturnInfo != null || value.ReplaceInfo != null)
                            {
                                ReturnInfo  returnInfo  = value.ReturnInfo;
                                ReplaceInfo replaceInfo = value.ReplaceInfo;
                                if (num6 == 0 || (returnInfo != null && returnInfo.HandleStatus != ReturnStatus.Refused && returnInfo.HandleStatus != ReturnStatus.Returned) || (replaceInfo != null && (replaceInfo.HandleStatus != ReplaceStatus.Refused || replaceInfo.HandleStatus != ReplaceStatus.Replaced)))
                                {
                                    if (value.ReturnInfo != null)
                                    {
                                        afterSaleTypes = AfterSaleTypes.ReturnAndRefund;
                                        num7           = value.ReturnInfo.ReturnId;
                                    }
                                    else
                                    {
                                        afterSaleTypes = AfterSaleTypes.Replace;
                                        num7           = value.ReplaceInfo.ReplaceId;
                                    }
                                }
                                num6++;
                            }
                        }
                        if (orderInfo.ItemStatus == OrderItemStatus.HasReturnOrReplace)
                        {
                            htmlAnchor.Title = "订单中有商品正在退货/换货中";
                        }
                        else if (orderInfo.ItemStatus == OrderItemStatus.HasReplace)
                        {
                            htmlAnchor.Title = "订单中有商品正在进行换货";
                        }
                        else if (orderInfo.ItemStatus == OrderItemStatus.HasReturn)
                        {
                            htmlAnchor.Title = "订单中有商品在进行退货/退款操作";
                        }
                        else if (orderInfo.ReturnedCount > 0)
                        {
                            htmlAnchor.Title = "订单中有商品已退货完成";
                        }
                        if (num6 > 0)
                        {
                            htmlAnchor.Visible = true;
                            if (afterSaleTypes == AfterSaleTypes.ReturnAndRefund)
                            {
                                htmlAnchor.HRef = "ReturnApplyDetail?ReturnId=" + num7;
                            }
                            else
                            {
                                htmlAnchor.HRef = "ReplaceApplyDetail?ReplaceId=" + num7;
                            }
                        }
                    }
                }
                if (orderInfo.FightGroupId > 0)
                {
                    FightGroupInfo fightGroup = VShopHelper.GetFightGroup(orderInfo.FightGroupId);
                    if (fightGroup != null)
                    {
                        linkButton.PostBackUrl = "/Supplier/vshop/FightGroupDetails.aspx?fightGroupActivityId=" + fightGroup.FightGroupActivityId;
                        if (fightGroup.Status == FightGroupStatus.FightGroupIn && orderInfo.OrderStatus != OrderStatus.WaitBuyerPay && orderInfo.OrderStatus != OrderStatus.Closed)
                        {
                            htmlInputHidden.Value = "1";
                        }
                        else
                        {
                            htmlInputHidden.Value = "0";
                        }
                    }
                }
                else
                {
                    linkButton.Visible = false;
                }
                OrderStatusLabel orderStatusLabel = (OrderStatusLabel)e.Item.FindControl("lblOrderStatus");
                if (orderStatusLabel != null)
                {
                    orderStatusLabel.OrderItemStatus = orderInfo.ItemStatus;
                    if (orderInfo.PreSaleId > 0)
                    {
                        orderStatusLabel.PreSaleId   = orderInfo.PreSaleId;
                        orderStatusLabel.DepositDate = orderInfo.DepositDate;
                    }
                }
                HtmlAnchor htmlAnchor2 = (HtmlAnchor)e.Item.FindControl("lkbtnToDetail");
                int        num8        = (int)((DataBinder.Eval(e.Item.DataItem, "StoreId") == DBNull.Value) ? ((object)0) : DataBinder.Eval(e.Item.DataItem, "StoreId"));
                bool       flag        = (bool)((DataBinder.Eval(e.Item.DataItem, "IsStoreCollect") == DBNull.Value) ? ((object)false) : DataBinder.Eval(e.Item.DataItem, "IsStoreCollect"));
                if (orderInfo.LineItems.Count <= 0)
                {
                    literal.Text = "(礼)";
                }
                Literal literal2 = (Literal)e.Item.FindControl("group");
                if (literal2 != null)
                {
                    if (num2 > 0)
                    {
                        literal2.Text = "(团)";
                    }
                    if (num3 > 0)
                    {
                        literal2.Text = "(抢)";
                    }
                    if (orderInfo.PreSaleId > 0)
                    {
                        literal2.Text = "(预)";
                    }
                }
                if (num2 > 0)
                {
                    string[] source = new string[1]
                    {
                        "hishop.plugins.payment.podrequest"
                    };
                    GroupBuyStatus groupBuyStatus = (GroupBuyStatus)DataBinder.Eval(e.Item.DataItem, "GroupBuyStatus");
                    Label          label2         = label;
                    int            visible;
                    if (orderInfo.ItemStatus == OrderItemStatus.Nomarl)
                    {
                        switch (orderStatus)
                        {
                        case OrderStatus.WaitBuyerPay:
                            if (source.Contains(text))
                            {
                                goto case OrderStatus.BuyerAlreadyPaid;
                            }
                            goto default;

                        case OrderStatus.BuyerAlreadyPaid:
                            visible = ((groupBuyStatus == GroupBuyStatus.Success) ? 1 : 0);
                            break;

                        default:
                            visible = 0;
                            break;
                        }
                    }
                    else
                    {
                        visible = 0;
                    }
                    label2.Visible = ((byte)visible != 0);
                }
                else if (num3 > 0 || num4 > 0)
                {
                    Label label3 = label;
                    int   visible2;
                    if (orderInfo.ItemStatus == OrderItemStatus.Nomarl)
                    {
                        switch (orderStatus)
                        {
                        case OrderStatus.WaitBuyerPay:
                            visible2 = ((text == "hishop.plugins.payment.podrequest") ? 1 : 0);
                            break;

                        default:
                            visible2 = 0;
                            break;

                        case OrderStatus.BuyerAlreadyPaid:
                            visible2 = 1;
                            break;
                        }
                    }
                    else
                    {
                        visible2 = 0;
                    }
                    label3.Visible = ((byte)visible2 != 0);
                }
                else if (masterSettings.OpenMultStore)
                {
                    Label label4 = label;
                    int   visible3;
                    switch (orderStatus)
                    {
                    case OrderStatus.WaitBuyerPay:
                        if (text == "hishop.plugins.payment.podrequest")
                        {
                            goto case OrderStatus.BuyerAlreadyPaid;
                        }
                        goto default;

                    case OrderStatus.BuyerAlreadyPaid:
                        if (num5 != -2)
                        {
                            visible3 = ((orderInfo.ItemStatus == OrderItemStatus.Nomarl) ? 1 : 0);
                            break;
                        }
                        goto default;

                    default:
                        visible3 = 0;
                        break;
                    }
                    label4.Visible = ((byte)visible3 != 0);
                }
                else
                {
                    Label label5 = label;
                    int   visible4;
                    switch (orderStatus)
                    {
                    case OrderStatus.WaitBuyerPay:
                        if (text == "hishop.plugins.payment.podrequest")
                        {
                            goto case OrderStatus.BuyerAlreadyPaid;
                        }
                        goto default;

                    case OrderStatus.BuyerAlreadyPaid:
                        visible4 = ((orderInfo.ItemStatus == OrderItemStatus.Nomarl) ? 1 : 0);
                        break;

                    default:
                        visible4 = 0;
                        break;
                    }
                    label5.Visible = ((byte)visible4 != 0);
                }
            }
        }