示例#1
0
        public static ExpressSet GetExpressSet()
        {
            ExpressSet set  = new ExpressSet();
            XmlNode    node = GetXmlNode().SelectSingleNode("companys");

            if (node != null)
            {
                set.Key    = node.Attributes["Kuaidi100Key"].Value;
                set.NewKey = node.Attributes["Kuaidi100NewKey"].Value;
                set.Url    = node.Attributes["Url"].Value;
            }
            return(set);
        }
示例#2
0
        public static ExpressSet GetExpressSet()
        {
            ExpressSet  expressSet = new ExpressSet();
            XmlDocument xmlNode    = ExpressHelper.GetXmlNode();
            XmlNode     xmlNode2   = xmlNode.SelectSingleNode("companys");

            if (xmlNode2 != null)
            {
                expressSet.Key    = xmlNode2.Attributes["Kuaidi100Key"].Value;
                expressSet.NewKey = xmlNode2.Attributes["Kuaidi100NewKey"].Value;
                expressSet.Url    = xmlNode2.Attributes["Url"].Value;
            }
            return(expressSet);
        }
示例#3
0
        //订单完成页面
        protected override void AttachChildControls()
        {
            string str = this.Page.Request.QueryString["orderId"];

            if (string.IsNullOrEmpty(str))
            {
                base.GotoResourceNotFound("");
            }
            OrderInfo  orderInfo  = ShoppingProcessor.GetOrderInfo(str);
            ExpressSet expressSet = ExpressHelper.GetExpressSet();
            Literal    literal    = this.FindControl("litHasNewKey") as Literal;
            Literal    literal2   = this.FindControl("litExpressUrl") as Literal;
            Literal    control    = this.FindControl("litCompanyCode") as Literal;

            literal.Text  = "0";
            literal2.Text = "";
            if (expressSet != null)
            {
                if (!string.IsNullOrEmpty(expressSet.NewKey))
                {
                    literal.Text = "1";
                }
                if (!string.IsNullOrEmpty(expressSet.Url.Trim()))
                {
                    literal2.Text = expressSet.Url.Trim();
                }
            }
            Literal literal4 = this.FindControl("litOrderID") as Literal;
            Literal literal5 = this.FindControl("litNumberID") as Literal;
            Literal literal6 = this.FindControl("litCompanyName") as Literal;
            Literal literal7 = this.FindControl("litLogisticsNumber") as Literal;

            literal4.Text = str;
            literal5.Text = orderInfo.ShipOrderNumber;
            literal6.SetWhenIsNotNull(orderInfo.ExpressCompanyName);
            literal7.SetWhenIsNotNull(orderInfo.ShipOrderNumber);
            control.SetWhenIsNotNull(orderInfo.ExpressCompanyAbb);
            PageTitle.AddSiteNameTitle("我的物流");
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.btnDelete.Click              += new EventHandler(this.btnDelete_Click);
            this.btnRestoreCheck.Click        += new EventHandler(this.btnRestoreCheck_Click);
            this.btnDeleteAndUpdateData.Click += new EventHandler(this.btnDeleteAndUpdateData_Click);
            ExpressSet expressSet = ExpressHelper.GetExpressSet();

            this.hdHasNewKey.Value  = "0";
            this.hdExpressUrl.Value = "";
            if (expressSet != null)
            {
                if (!string.IsNullOrEmpty(expressSet.NewKey))
                {
                    this.hdHasNewKey.Value = "1";
                }
                if (!string.IsNullOrEmpty(expressSet.Url.Trim()))
                {
                    this.hdExpressUrl.Value = expressSet.Url.Trim();
                }
            }
            if (Globals.RequestFormStr("posttype") == "modifyRefundMondy")
            {
                base.Response.ContentType = "application/json";
                string  s      = "{\"type\":\"0\",\"tips\":\"操作失败!\"}";
                decimal result = 0M;
                decimal.TryParse(Globals.RequestFormStr("price"), out result);
                int    productid = Globals.RequestFormNum("pid");
                string str3      = Globals.RequestFormStr("oid");
                if (((result > 0M) && (productid > 0)) && !string.IsNullOrEmpty(str3))
                {
                    if (RefundHelper.UpdateRefundMoney(str3, productid, result))
                    {
                        s = "{\"type\":\"1\",\"tips\":\"操作成功!\"}";
                    }
                }
                else if (result <= 0M)
                {
                    s = "{\"type\":\"0\",\"tips\":\"退款金额需大于0!\"}";
                }
                base.Response.Write(s);
                base.Response.End();
            }
            else
            {
                this.reurl = "OrderDetails.aspx?OrderId=" + this.orderId + "&t=" + DateTime.Now.ToString("HHmmss");
                this.btnMondifyPay.Click += new EventHandler(this.btnMondifyPay_Click);
                this.btnRemark.Click     += new EventHandler(this.btnRemark_Click);
                this.order = OrderHelper.GetOrderInfo(this.orderId);
                if (!base.IsPostBack)
                {
                    if (string.IsNullOrEmpty(this.orderId))
                    {
                        base.GotoResourceNotFound();
                    }
                    else
                    {
                        this.hdfOrderID.Value  = this.orderId;
                        this.litOrderDate.Text = this.order.OrderDate.ToString("yyyy-MM-dd HH:mm:ss");
                        if (this.order.PayDate.HasValue)
                        {
                            this.litPayDate.Text = DateTime.Parse(this.order.PayDate.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                        }
                        if (this.order.ShippingDate.HasValue)
                        {
                            this.litShippingDate.Text = DateTime.Parse(this.order.ShippingDate.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                        }
                        if (this.order.FinishDate.HasValue)
                        {
                            this.litFinishDate.Text = DateTime.Parse(this.order.FinishDate.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                        }
                        this.lblOrderStatus.OrderStatusCode = this.order.DeleteBeforeState;
                        switch (this.order.DeleteBeforeState)
                        {
                        case OrderStatus.WaitBuyerPay:
                            this.ProcessClass2 = "active";
                            break;

                        case OrderStatus.BuyerAlreadyPaid:
                            this.ProcessClass2 = "ok";
                            this.ProcessClass3 = "active";
                            break;

                        case OrderStatus.SellerAlreadySent:
                            this.ProcessClass2 = "ok";
                            this.ProcessClass3 = "ok";
                            this.ProcessClass4 = "active";
                            break;

                        case OrderStatus.Finished:
                            this.ProcessClass2 = "ok";
                            this.ProcessClass3 = "ok";
                            this.ProcessClass4 = "ok";
                            break;
                        }
                        this.litRemark.Text = this.order.Remark;
                        string orderId      = this.order.OrderId;
                        string orderMarking = this.order.OrderMarking;
                        if (!string.IsNullOrEmpty(orderMarking))
                        {
                            orderId = orderId + " (" + this.order.PaymentType + "流水号:" + orderMarking + ")";
                        }
                        this.litOrderId.Text        = orderId;
                        this.litUserName.Text       = this.order.Username;
                        this.litPayType.Text        = this.order.PaymentType;
                        this.litShipToDate.Text     = this.order.ShipToDate;
                        this.litRealName.Text       = this.order.ShipTo;
                        this.litUserTel.Text        = string.IsNullOrEmpty(this.order.CellPhone) ? this.order.TelPhone : this.order.CellPhone;
                        this.litShippingRegion.Text = this.order.ShippingRegion;
                        this.litFreight.Text        = Globals.FormatMoney(this.order.AdjustedFreight);
                        if (this.order.ReferralUserId == 0)
                        {
                            this.litSiteName.Text = "主站";
                        }
                        else
                        {
                            DistributorsInfo distributorInfo = DistributorsBrower.GetDistributorInfo(this.order.ReferralUserId);
                            if (distributorInfo != null)
                            {
                                this.litSiteName.Text = distributorInfo.StoreName;
                            }
                        }
                        StringBuilder builder = new StringBuilder();
                        if (!string.IsNullOrEmpty(this.order.ActivitiesName))
                        {
                            this.otherDiscountPrice += this.order.DiscountAmount;
                            builder.Append("<p>" + this.order.ActivitiesName + ":¥" + this.order.DiscountAmount.ToString("F2") + "</p>");
                        }
                        if (!string.IsNullOrEmpty(this.order.ReducedPromotionName))
                        {
                            this.otherDiscountPrice += this.order.ReducedPromotionAmount;
                            builder.Append("<p>" + this.order.ReducedPromotionName + ":¥" + this.order.ReducedPromotionAmount.ToString("F2") + "</p>");
                        }
                        if (!string.IsNullOrEmpty(this.order.CouponName))
                        {
                            this.otherDiscountPrice += this.order.CouponAmount;
                            builder.Append("<p>" + this.order.CouponName + ":¥" + this.order.CouponAmount.ToString("F2") + "</p>");
                        }
                        if (!string.IsNullOrEmpty(this.order.RedPagerActivityName))
                        {
                            this.otherDiscountPrice += this.order.RedPagerAmount;
                            builder.Append("<p>" + this.order.RedPagerActivityName + ":¥" + this.order.RedPagerAmount.ToString("F2") + "</p>");
                        }
                        if (this.order.PointToCash > 0M)
                        {
                            this.otherDiscountPrice += this.order.PointToCash;
                            builder.Append("<p>积分抵现:¥" + this.order.PointToCash.ToString("F2") + "</p>");
                        }
                        this.order.GetAdjustCommssion();
                        decimal num3 = 0M;
                        decimal num4 = 0M;
                        foreach (LineItemInfo info2 in this.order.LineItems.Values)
                        {
                            if (info2.IsAdminModify)
                            {
                                num3 += info2.ItemAdjustedCommssion;
                            }
                            else
                            {
                                num4 += info2.ItemAdjustedCommssion;
                            }
                        }
                        if (num3 != 0M)
                        {
                            if (num3 > 0M)
                            {
                                builder.Append("<p>管理员调价减:¥" + num3.ToString("F2") + "</p>");
                            }
                            else
                            {
                                builder.Append("<p>管理员调价加:¥" + ((num3 * -1M)).ToString("F2") + "</p>");
                            }
                        }
                        if (num4 != 0M)
                        {
                            if (num4 > 0M)
                            {
                                builder.Append("<p>分销商调价减:¥" + num4.ToString("F2") + "</p>");
                            }
                            else
                            {
                                builder.Append("<p>分销商调价加:¥" + ((num4 * -1M)).ToString("F2") + "</p>");
                            }
                        }
                        this.litActivityShow.Text = builder.ToString();
                        if (((int)this.lblOrderStatus.OrderStatusCode) != 4)
                        {
                            this.lbCloseReason.Visible = false;
                        }
                        else
                        {
                            this.divOrderProcess.Visible = false;
                            this.lbReason.Text           = this.order.CloseReason;
                        }
                        if ((((this.order.OrderStatus == OrderStatus.SellerAlreadySent) || (this.order.OrderStatus == OrderStatus.Finished)) || (this.order.OrderStatus == OrderStatus.Deleted)) && !string.IsNullOrEmpty(this.order.ExpressCompanyAbb))
                        {
                            this.pLoginsticInfo.Visible = true;
                            if ((Express.GetExpressType() == "kuaidi100") && (this.power != null))
                            {
                                this.power.Visible = true;
                            }
                        }
                        this.BindRemark(this.order);
                        this.ddlpayment.DataBind();
                        this.ddlpayment.SelectedValue = new int?(this.order.PaymentTypeId);
                        this.rptItemList.DataSource   = this.order.LineItems.Values;
                        this.rptItemList.DataBind();
                        string oldAddress = this.order.OldAddress;
                        string str7       = string.Empty;
                        if (!string.IsNullOrEmpty(this.order.ShippingRegion))
                        {
                            str7 = this.order.ShippingRegion.Replace((char)0xff0c, ' ');
                        }
                        if (!string.IsNullOrEmpty(this.order.Address))
                        {
                            str7 = str7 + this.order.Address;
                        }
                        if (!string.IsNullOrEmpty(this.order.ShipTo))
                        {
                            str7 = str7 + ", " + this.order.ShipTo;
                        }
                        if (!string.IsNullOrEmpty(this.order.TelPhone))
                        {
                            str7 = str7 + ", " + this.order.TelPhone;
                        }
                        if (!string.IsNullOrEmpty(this.order.CellPhone))
                        {
                            str7 = str7 + ", " + this.order.CellPhone;
                        }
                        if (string.IsNullOrEmpty(oldAddress))
                        {
                            this.lblOriAddress.Text  = str7;
                            this.pNewAddress.Visible = false;
                        }
                        else
                        {
                            this.lblOriAddress.Text = oldAddress;
                            this.litAddress.Text    = str7;
                        }
                        if (((this.order.OrderStatus == OrderStatus.Finished) || (this.order.OrderStatus == OrderStatus.SellerAlreadySent)) || (this.order.OrderStatus == OrderStatus.Deleted))
                        {
                            string realModeName = this.order.RealModeName;
                            if (string.IsNullOrEmpty(realModeName))
                            {
                                realModeName = this.order.ModeName;
                            }
                            this.litModeName.Text        = realModeName;
                            this.litShipOrderNumber.Text = this.order.ShipOrderNumber;
                        }
                        else
                        {
                            this.litModeName.Text = this.order.ModeName;
                        }
                        if (!string.IsNullOrEmpty(this.order.ExpressCompanyName))
                        {
                            this.litCompanyName.Text = this.order.ExpressCompanyName;
                            this.hdCompanyCode.Value = this.order.ExpressCompanyAbb;
                        }
                        MemberInfo member = MemberProcessor.GetMember(this.order.UserId, true);
                        if (member != null)
                        {
                            if (!string.IsNullOrEmpty(member.OpenId))
                            {
                                this.litWeiXinNickName.Text = member.UserName;
                            }
                            if (!string.IsNullOrEmpty(member.UserBindName))
                            {
                                this.litUserName.Text = member.UserBindName;
                            }
                        }
                        if (this.order.ReferralUserId > 0)
                        {
                            builder = new StringBuilder();
                            builder.Append("<div class=\"commissionInfo mb20\"><h3>佣金信息</h3><div class=\"commissionInfoInner\">");
                            decimal num5                 = 0M;
                            decimal totalCommssion       = 0M;
                            decimal secondTotalCommssion = 0M;
                            decimal thirdTotalCommssion  = 0M;
                            if (this.order.OrderStatus != OrderStatus.Closed)
                            {
                                totalCommssion       = this.order.GetTotalCommssion();
                                secondTotalCommssion = this.order.GetSecondTotalCommssion();
                                thirdTotalCommssion  = this.order.GetThirdTotalCommssion();
                            }
                            num5 += totalCommssion;
                            string           storeName = string.Empty;
                            DistributorsInfo info4     = DistributorsBrower.GetDistributorInfo(this.order.ReferralUserId);
                            if (info4 != null)
                            {
                                storeName = info4.StoreName;
                                if ((this.order.ReferralPath != null) && (this.order.ReferralPath.Length > 0))
                                {
                                    string[] strArray      = this.order.ReferralPath.Trim().Split(new char[] { '|' });
                                    int      distributorid = 0;
                                    if (strArray.Length > 1)
                                    {
                                        distributorid = Globals.ToNum(strArray[0]);
                                        if (distributorid > 0)
                                        {
                                            info4 = DistributorsBrower.GetDistributorInfo(distributorid);
                                            if (info4 != null)
                                            {
                                                num5 += thirdTotalCommssion;
                                                builder.Append("<p class=\"mb5\"><span>上二级分销商:</span> " + info4.StoreName + "<i> ¥" + thirdTotalCommssion.ToString("F2") + "</i></p>");
                                            }
                                        }
                                        distributorid = Globals.ToNum(strArray[1]);
                                        if (distributorid > 0)
                                        {
                                            info4 = DistributorsBrower.GetDistributorInfo(distributorid);
                                            if (info4 != null)
                                            {
                                                num5 += secondTotalCommssion;
                                                builder.Append("<p class=\"mb5\"><span>上一级分销商:</span> " + info4.StoreName + "<i> ¥" + secondTotalCommssion.ToString("F2") + "</i></p>");
                                            }
                                        }
                                    }
                                    else if (strArray.Length == 1)
                                    {
                                        distributorid = Globals.ToNum(strArray[0]);
                                        if (distributorid > 0)
                                        {
                                            info4 = DistributorsBrower.GetDistributorInfo(distributorid);
                                            if (info4 != null)
                                            {
                                                builder.Append("<p class=\"mb5\"><span>上二级分销商:</span>-</p>");
                                                num5 += secondTotalCommssion;
                                                builder.Append("<p class=\"mb5\"><span>上一级分销商:</span>" + info4.StoreName + " <i> ¥" + secondTotalCommssion.ToString("F2") + "</i></p>");
                                            }
                                        }
                                    }
                                }
                                else
                                {
                                    builder.Append("<p class=\"mb5\"><span>上二级分销商:</span>-</p>");
                                    builder.Append("<p class=\"mb5\"><span>上一级分销商:</span>-</p>");
                                }
                            }
                            builder.Append("<div class=\"clearfix\">");
                            if (num4 > 0M)
                            {
                                string   str10      = " (改价让利¥" + num4.ToString("F2") + ")";
                                string[] strArray10 = new string[] { "<p><span>成交店铺:</span> ", storeName, " <i>¥", (totalCommssion - num4).ToString("F2"), "</i>", str10, "</p>" };
                                builder.Append(string.Concat(strArray10));
                                builder.Append("<p><span>佣金总额:</span><i>¥" + ((num5 - num4)).ToString("F2") + "</i></p>");
                            }
                            else
                            {
                                builder.Append("<p><span>成交店铺:</span> " + storeName + " <i>¥" + totalCommssion.ToString("F2") + "</i></p>");
                                builder.Append("<p><span>佣金总额:</span><i>¥" + num5.ToString("F2") + "</i></p>");
                            }
                            builder.Append("</div></div></div>");
                            this.litCommissionInfo.Text = builder.ToString();
                        }
                        DataTable orderItemsReFundByOrderID = RefundHelper.GetOrderItemsReFundByOrderID(this.orderId);
                        if (orderItemsReFundByOrderID.Rows.Count > 0)
                        {
                            this.rptRefundList.DataSource = orderItemsReFundByOrderID;
                            this.rptRefundList.DataBind();
                        }
                    }
                }
            }
        }
示例#5
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            ExpressSet expressSet = ExpressHelper.GetExpressSet();

            this.hdHasNewKey.Value  = "0";
            this.hdExpressUrl.Value = "";
            if (expressSet != null)
            {
                if (!string.IsNullOrEmpty(expressSet.NewKey))
                {
                    this.hdHasNewKey.Value = "1";
                }
                if (!string.IsNullOrEmpty(expressSet.Url.Trim()))
                {
                    this.hdExpressUrl.Value = expressSet.Url.Trim();
                }
            }
            string a = Globals.RequestFormStr("posttype");

            if (a == "modifyRefundMondy")
            {
                base.Response.ContentType = "application/json";
                string  s   = "{\"type\":\"0\",\"tips\":\"操作失败!\"}";
                decimal num = 0m;
                decimal.TryParse(Globals.RequestFormStr("price"), out num);
                int    num2 = Globals.RequestFormNum("pid");
                string text = Globals.RequestFormStr("oid");
                if (num > 0m && num2 > 0 && !string.IsNullOrEmpty(text))
                {
                    if (RefundHelper.UpdateRefundMoney(text, num2, num))
                    {
                        s = "{\"type\":\"1\",\"tips\":\"操作成功!\"}";
                    }
                }
                else if (num <= 0m)
                {
                    s = "{\"type\":\"0\",\"tips\":\"退款金额需大于0!\"}";
                }
                base.Response.Write(s);
                base.Response.End();
                return;
            }
            this.reurl = "OrderDetails.aspx?OrderId=" + this.orderId + "&t=" + System.DateTime.Now.ToString("HHmmss");
            this.btnMondifyPay.Click += new System.EventHandler(this.btnMondifyPay_Click);
            this.btnCloseOrder.Click += new System.EventHandler(this.btnCloseOrder_Click);
            this.btnRemark.Click     += new System.EventHandler(this.btnRemark_Click);
            this.order = OrderHelper.GetOrderInfo(this.orderId);
            if (this.order != null)
            {
                if (!base.IsPostBack)
                {
                    if (string.IsNullOrEmpty(this.orderId))
                    {
                        base.GotoResourceNotFound();
                        return;
                    }
                    this.hdfOrderID.Value  = this.orderId;
                    this.litOrderDate.Text = this.order.OrderDate.ToString("yyyy-MM-dd HH:mm:ss");
                    if (this.order.PayDate.HasValue)
                    {
                        this.litPayDate.Text = System.DateTime.Parse(this.order.PayDate.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (this.order.ShippingDate.HasValue)
                    {
                        this.litShippingDate.Text = System.DateTime.Parse(this.order.ShippingDate.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (this.order.FinishDate.HasValue)
                    {
                        this.litFinishDate.Text = System.DateTime.Parse(this.order.FinishDate.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    this.lblOrderStatus.OrderStatusCode = this.order.OrderStatus;
                    switch (this.order.OrderStatus)
                    {
                    case OrderStatus.WaitBuyerPay:
                        this.ProcessClass2 = "active";
                        if (this.order.Gateway != "hishop.plugins.payment.podrequest")
                        {
                            this.btnConfirmPay.Visible = true;
                        }
                        this.btnModifyAddr.Attributes.Add("onclick", "DialogFrame('../trade/ShipAddress.aspx?action=update&OrderId=" + this.orderId + "','修改收货地址',620,410)");
                        this.btnModifyAddr.Visible = true;
                        break;

                    case OrderStatus.BuyerAlreadyPaid:
                        this.ProcessClass2 = "ok";
                        this.ProcessClass3 = "active";
                        this.btnModifyAddr.Attributes.Add("onclick", "DialogFrame('../trade/ShipAddress.aspx?action=update&OrderId=" + this.orderId + "','修改收货地址',620,410)");
                        this.btnModifyAddr.Visible = true;
                        break;

                    case OrderStatus.SellerAlreadySent:
                        this.ProcessClass2 = "ok";
                        this.ProcessClass3 = "ok";
                        this.ProcessClass4 = "active";
                        break;

                    case OrderStatus.Finished:
                        this.ProcessClass2 = "ok";
                        this.ProcessClass3 = "ok";
                        this.ProcessClass4 = "ok";
                        break;
                    }
                    if (this.order.ManagerMark.HasValue)
                    {
                        this.OrderRemarkImageLink.ManagerMarkValue = (int)this.order.ManagerMark.Value;
                        this.litManagerRemark.Text = this.order.ManagerRemark;
                    }
                    else
                    {
                        this.divRemarkShow.Visible = false;
                    }
                    this.litRemark.Text = this.order.Remark;
                    string text2        = this.order.OrderId;
                    string orderMarking = this.order.OrderMarking;
                    if (!string.IsNullOrEmpty(orderMarking))
                    {
                        text2 = string.Concat(new string[]
                        {
                            text2,
                            " (",
                            this.order.PaymentType,
                            "流水号:",
                            orderMarking,
                            ")"
                        });
                    }
                    this.litOrderId.Text        = text2;
                    this.litUserName.Text       = this.order.Username;
                    this.litPayType.Text        = this.order.PaymentType;
                    this.litShipToDate.Text     = this.order.ShipToDate;
                    this.litRealName.Text       = this.order.ShipTo;
                    this.litUserTel.Text        = (string.IsNullOrEmpty(this.order.CellPhone) ? this.order.TelPhone : this.order.CellPhone);
                    this.litShippingRegion.Text = this.order.ShippingRegion;
                    this.litFreight.Text        = Globals.FormatMoney(this.order.AdjustedFreight);
                    if (this.order.ReferralUserId == 0)
                    {
                        this.litSiteName.Text = "主站";
                    }
                    else
                    {
                        DistributorsInfo distributorInfo = DistributorsBrower.GetDistributorInfo(this.order.ReferralUserId);
                        if (distributorInfo != null)
                        {
                            this.litSiteName.Text = distributorInfo.StoreName;
                        }
                    }
                    System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
                    if (!string.IsNullOrEmpty(this.order.ActivitiesName))
                    {
                        this.otherDiscountPrice += this.order.DiscountAmount;
                        stringBuilder.Append(string.Concat(new string[]
                        {
                            "<p>",
                            this.order.ActivitiesName,
                            ":¥",
                            this.order.DiscountAmount.ToString("F2"),
                            "</p>"
                        }));
                    }
                    if (!string.IsNullOrEmpty(this.order.ReducedPromotionName))
                    {
                        this.otherDiscountPrice += this.order.ReducedPromotionAmount;
                        stringBuilder.Append(string.Concat(new string[]
                        {
                            "<p>",
                            this.order.ReducedPromotionName,
                            ":¥",
                            this.order.ReducedPromotionAmount.ToString("F2"),
                            "</p>"
                        }));
                    }
                    if (!string.IsNullOrEmpty(this.order.CouponName))
                    {
                        this.otherDiscountPrice += this.order.CouponAmount;
                        stringBuilder.Append(string.Concat(new string[]
                        {
                            "<p>",
                            this.order.CouponName,
                            ":¥",
                            this.order.CouponAmount.ToString("F2"),
                            "</p>"
                        }));
                    }
                    if (!string.IsNullOrEmpty(this.order.RedPagerActivityName))
                    {
                        this.otherDiscountPrice += this.order.RedPagerAmount;
                        stringBuilder.Append(string.Concat(new string[]
                        {
                            "<p>",
                            this.order.RedPagerActivityName,
                            ":¥",
                            this.order.RedPagerAmount.ToString("F2"),
                            "</p>"
                        }));
                    }
                    if (this.order.PointToCash > 0m)
                    {
                        this.otherDiscountPrice += this.order.PointToCash;
                        stringBuilder.Append("<p>积分抵现:¥" + this.order.PointToCash.ToString("F2") + "</p>");
                    }
                    this.order.GetAdjustCommssion();
                    decimal d    = 0m;
                    decimal num3 = 0m;
                    foreach (LineItemInfo current in this.order.LineItems.Values)
                    {
                        if (current.IsAdminModify)
                        {
                            d += current.ItemAdjustedCommssion;
                        }
                        else
                        {
                            num3 += current.ItemAdjustedCommssion;
                        }
                    }
                    if (d != 0m)
                    {
                        if (d > 0m)
                        {
                            stringBuilder.Append("<p>管理员调价减:¥" + d.ToString("F2") + "</p>");
                        }
                        else
                        {
                            stringBuilder.Append("<p>管理员调价加:¥" + (d * -1m).ToString("F2") + "</p>");
                        }
                    }
                    if (num3 != 0m)
                    {
                        if (num3 > 0m)
                        {
                            stringBuilder.Append("<p>分销商调价减:¥" + num3.ToString("F2") + "</p>");
                        }
                        else
                        {
                            stringBuilder.Append("<p>分销商调价加:¥" + (num3 * -1m).ToString("F2") + "</p>");
                        }
                    }
                    this.litActivityShow.Text = stringBuilder.ToString();
                    if ((int)this.lblOrderStatus.OrderStatusCode != 4)
                    {
                        this.lbCloseReason.Visible = false;
                    }
                    else
                    {
                        this.divOrderProcess.Visible = false;
                        this.lbReason.Text           = this.order.CloseReason;
                    }
                    if (this.order.OrderStatus == OrderStatus.BuyerAlreadyPaid || (this.order.OrderStatus == OrderStatus.WaitBuyerPay && this.order.Gateway == "hishop.plugins.payment.podrequest"))
                    {
                        this.btnSendGoods.Visible = true;
                    }
                    else
                    {
                        this.btnSendGoods.Visible = false;
                    }
                    if ((this.order.OrderStatus == OrderStatus.SellerAlreadySent || this.order.OrderStatus == OrderStatus.Finished) && !string.IsNullOrEmpty(this.order.ExpressCompanyAbb))
                    {
                        this.pLoginsticInfo.Visible  = true;
                        this.btnViewLogistic.Visible = true;
                        if (Express.GetExpressType() == "kuaidi100" && this.power != null)
                        {
                            this.power.Visible = true;
                        }
                    }
                    if (this.order.OrderStatus == OrderStatus.WaitBuyerPay)
                    {
                        this.btnClocsOrder.Visible  = true;
                        this.btnModifyPrice.Visible = true;
                    }
                    else
                    {
                        this.btnClocsOrder.Visible  = false;
                        this.btnModifyPrice.Visible = false;
                    }
                    this.btnModifyPrice.Attributes.Add("onclick", string.Concat(new string[]
                    {
                        "DialogFrame('../trade/EditOrder.aspx?OrderId=",
                        this.orderId,
                        "&reurl=",
                        base.Server.UrlEncode(this.reurl),
                        "','修改订单价格',900,450)"
                    }));
                    this.BindRemark(this.order);
                    this.ddlpayment.DataBind();
                    this.ddlpayment.SelectedValue = new int?(this.order.PaymentTypeId);
                    this.rptItemList.DataSource   = this.order.LineItems.Values;
                    this.rptItemList.DataBind();
                    string oldAddress = this.order.OldAddress;
                    string text3      = string.Empty;
                    if (!string.IsNullOrEmpty(this.order.ShippingRegion))
                    {
                        text3 = this.order.ShippingRegion.Replace(',', ' ');
                    }
                    if (!string.IsNullOrEmpty(this.order.Address))
                    {
                        text3 += this.order.Address;
                    }
                    if (!string.IsNullOrEmpty(this.order.ShipTo))
                    {
                        text3 = text3 + "," + this.order.ShipTo;
                    }
                    if (!string.IsNullOrEmpty(this.order.TelPhone))
                    {
                        text3 = text3 + "," + this.order.TelPhone;
                    }
                    if (!string.IsNullOrEmpty(this.order.CellPhone))
                    {
                        text3 = text3 + "," + this.order.CellPhone;
                    }
                    if (string.IsNullOrEmpty(oldAddress))
                    {
                        this.lblOriAddress.Text  = text3;
                        this.pNewAddress.Visible = false;
                    }
                    else
                    {
                        this.lblOriAddress.Text = oldAddress;
                        this.litAddress.Text    = text3;
                    }
                    if (this.order.OrderStatus == OrderStatus.Finished || this.order.OrderStatus == OrderStatus.SellerAlreadySent)
                    {
                        string text4 = this.order.RealModeName;
                        if (string.IsNullOrEmpty(text4))
                        {
                            text4 = this.order.ModeName;
                        }
                        this.litModeName.Text        = text4;
                        this.litShipOrderNumber.Text = this.order.ShipOrderNumber;
                    }
                    else
                    {
                        this.litModeName.Text = this.order.ModeName;
                    }
                    if (!string.IsNullOrEmpty(this.order.ExpressCompanyName))
                    {
                        this.litCompanyName.Text = this.order.ExpressCompanyName;
                        this.hdCompanyCode.Value = this.order.ExpressCompanyAbb;
                    }
                    MemberInfo member = MemberProcessor.GetMember(this.order.UserId, true);
                    if (member != null)
                    {
                        if (!string.IsNullOrEmpty(member.OpenId))
                        {
                            this.litWeiXinNickName.Text = member.UserName;
                        }
                        if (!string.IsNullOrEmpty(member.UserBindName))
                        {
                            this.litUserName.Text = member.UserBindName;
                        }
                    }
                    if (this.order.ReferralUserId > 0)
                    {
                        stringBuilder = new System.Text.StringBuilder();
                        stringBuilder.Append("<div class=\"commissionInfo mb20\"><h3>佣金信息</h3><div class=\"commissionInfoInner\">");
                        decimal d2   = 0m;
                        decimal num4 = 0m;
                        decimal d3   = 0m;
                        decimal d4   = 0m;
                        if (this.order.OrderStatus != OrderStatus.Closed)
                        {
                            num4 = this.order.GetTotalCommssion();
                            d3   = this.order.GetSecondTotalCommssion();
                            d4   = this.order.GetThirdTotalCommssion();
                        }
                        d2 += num4;
                        string           text5            = string.Empty;
                        DistributorsInfo distributorInfo2 = DistributorsBrower.GetDistributorInfo(this.order.ReferralUserId);
                        if (distributorInfo2 != null)
                        {
                            text5 = distributorInfo2.StoreName;
                            if (this.order.ReferralPath != null && this.order.ReferralPath.Length > 0)
                            {
                                string[] array = this.order.ReferralPath.Trim().Split(new char[]
                                {
                                    '|'
                                });
                                if (array.Length > 1)
                                {
                                    int num5 = Globals.ToNum(array[0]);
                                    if (num5 > 0)
                                    {
                                        distributorInfo2 = DistributorsBrower.GetDistributorInfo(num5);
                                        if (distributorInfo2 != null)
                                        {
                                            d2 += d4;
                                            stringBuilder.Append(string.Concat(new string[]
                                            {
                                                "<p class=\"mb5\"><span>上二级分销商:</span> ",
                                                distributorInfo2.StoreName,
                                                "<i> ¥",
                                                d4.ToString("F2"),
                                                "</i></p>"
                                            }));
                                        }
                                    }
                                    num5 = Globals.ToNum(array[1]);
                                    if (num5 > 0)
                                    {
                                        distributorInfo2 = DistributorsBrower.GetDistributorInfo(num5);
                                        if (distributorInfo2 != null)
                                        {
                                            d2 += d3;
                                            stringBuilder.Append(string.Concat(new string[]
                                            {
                                                "<p class=\"mb5\"><span>上一级分销商:</span> ",
                                                distributorInfo2.StoreName,
                                                "<i> ¥",
                                                d3.ToString("F2"),
                                                "</i></p>"
                                            }));
                                        }
                                    }
                                }
                                else if (array.Length == 1)
                                {
                                    int num5 = Globals.ToNum(array[0]);
                                    if (num5 > 0)
                                    {
                                        distributorInfo2 = DistributorsBrower.GetDistributorInfo(num5);
                                        if (distributorInfo2 != null)
                                        {
                                            stringBuilder.Append("<p class=\"mb5\"><span>上二级分销商:</span>-</p>");
                                            d2 += d3;
                                            stringBuilder.Append(string.Concat(new string[]
                                            {
                                                "<p class=\"mb5\"><span>上一级分销商:</span>",
                                                distributorInfo2.StoreName,
                                                " <i> ¥",
                                                d3.ToString("F2"),
                                                "</i></p>"
                                            }));
                                        }
                                    }
                                }
                            }
                            else
                            {
                                stringBuilder.Append("<p class=\"mb5\"><span>上二级分销商:</span>-</p>");
                                stringBuilder.Append("<p class=\"mb5\"><span>上一级分销商:</span>-</p>");
                            }
                        }
                        stringBuilder.Append("<div class=\"clearfix\">");
                        if (num3 > 0m)
                        {
                            string text6 = " (改价让利¥" + num3.ToString("F2") + ")";
                            stringBuilder.Append(string.Concat(new string[]
                            {
                                "<p><span>成交店铺:</span> ",
                                text5,
                                " <i>¥",
                                (num4 - num3).ToString("F2"),
                                "</i>",
                                text6,
                                "</p>"
                            }));
                            stringBuilder.Append("<p><span>佣金总额:</span><i>¥" + (d2 - num3).ToString("F2") + "</i></p>");
                        }
                        else
                        {
                            stringBuilder.Append(string.Concat(new string[]
                            {
                                "<p><span>成交店铺:</span> ",
                                text5,
                                " <i>¥",
                                num4.ToString("F2"),
                                "</i></p>"
                            }));
                            stringBuilder.Append("<p><span>佣金总额:</span><i>¥" + d2.ToString("F2") + "</i></p>");
                        }
                        stringBuilder.Append("</div></div></div>");
                        this.litCommissionInfo.Text = stringBuilder.ToString();
                    }
                    System.Data.DataTable orderItemsReFundByOrderID = RefundHelper.GetOrderItemsReFundByOrderID(this.orderId);
                    if (orderItemsReFundByOrderID.Rows.Count > 0)
                    {
                        this.rptRefundList.DataSource = orderItemsReFundByOrderID;
                        this.rptRefundList.DataBind();
                        return;
                    }
                }
            }
            else
            {
                base.Response.Write("原订单已删除!");
                base.Response.End();
            }
        }
示例#6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ExpressSet expressSet = ExpressHelper.GetExpressSet();

            this.hdHasNewKey.Value  = "0";
            this.hdExpressUrl.Value = "";
            if (expressSet != null)
            {
                if (!string.IsNullOrEmpty(expressSet.NewKey))
                {
                    this.hdHasNewKey.Value = "1";
                }
                if (!string.IsNullOrEmpty(expressSet.Url.Trim()))
                {
                    this.hdExpressUrl.Value = expressSet.Url.Trim();
                }
            }
            if (Globals.RequestFormStr("posttype") == "modifyRefundMondy")
            {
                base.Response.ContentType = "application/json";
                string  s      = "{\"type\":\"0\",\"tips\":\"操作失败!\"}";
                decimal result = 0M;
                decimal.TryParse(Globals.RequestFormStr("price"), out result);
                int    productid = Globals.RequestFormNum("pid");
                string str3      = Globals.RequestFormStr("oid");
                if (((result > 0M) && (productid > 0)) && !string.IsNullOrEmpty(str3))
                {
                    if (RefundHelper.UpdateRefundMoney(str3, productid, result))
                    {
                        s = "{\"type\":\"1\",\"tips\":\"操作成功!\"}";
                    }
                }
                else if (result <= 0M)
                {
                    s = "{\"type\":\"0\",\"tips\":\"退款金额需大于0!\"}";
                }
                base.Response.Write(s);
                base.Response.End();
            }
            else
            {
                this.reurl = "OrderDetails.aspx?OrderId=" + this.orderId + "&t=" + DateTime.Now.ToString("HHmmss");
                this.btnMondifyPay.Click += new EventHandler(this.btnMondifyPay_Click);
                this.btnCloseOrder.Click += new EventHandler(this.btnCloseOrder_Click);
                this.btnRemark.Click     += new EventHandler(this.btnRemark_Click);
                this.order = OrderHelper.GetOrderInfo(this.orderId);
                if (this.order == null)
                {
                    base.Response.Write("原订单已删除!");
                    base.Response.End();
                }
                else if (!base.IsPostBack)
                {
                    this.btnUpdateExpress.Visible = this.order.OrderStatus == OrderStatus.SellerAlreadySent;
                    if (string.IsNullOrEmpty(this.orderId))
                    {
                        base.GotoResourceNotFound();
                    }
                    else
                    {
                        this.hdfOrderID.Value  = this.orderId;
                        this.litOrderDate.Text = this.order.OrderDate.ToString("yyyy-MM-dd HH:mm:ss");
                        if (this.order.PayDate.HasValue)
                        {
                            this.litPayDate.Text = DateTime.Parse(this.order.PayDate.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                        }
                        if (this.order.ShippingDate.HasValue)
                        {
                            this.litShippingDate.Text = DateTime.Parse(this.order.ShippingDate.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                        }
                        if (this.order.FinishDate.HasValue)
                        {
                            this.litFinishDate.Text = DateTime.Parse(this.order.FinishDate.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                        }
                        this.lblOrderStatus.OrderStatusCode = this.order.OrderStatus;
                        switch (this.order.OrderStatus)
                        {
                        case OrderStatus.WaitBuyerPay:
                            this.ProcessClass2 = "active";
                            if (this.order.Gateway != "hishop.plugins.payment.podrequest")
                            {
                                this.btnConfirmPay.Visible = true;
                            }
                            this.btnModifyAddr.Attributes.Add("onclick", "DialogFrame('../trade/ShipAddress.aspx?action=update&OrderId=" + this.orderId + "','修改收货地址',620,410)");
                            this.btnModifyAddr.Visible = true;
                            break;

                        case OrderStatus.BuyerAlreadyPaid:
                            this.ProcessClass2 = "ok";
                            this.ProcessClass3 = "active";
                            this.btnModifyAddr.Attributes.Add("onclick", "DialogFrame('../trade/ShipAddress.aspx?action=update&OrderId=" + this.orderId + "','修改收货地址',620,410)");
                            this.btnModifyAddr.Visible = true;
                            break;

                        case OrderStatus.SellerAlreadySent:
                            this.ProcessClass2 = "ok";
                            this.ProcessClass3 = "ok";
                            this.ProcessClass4 = "active";
                            break;

                        case OrderStatus.Finished:
                            this.ProcessClass2 = "ok";
                            this.ProcessClass3 = "ok";
                            this.ProcessClass4 = "ok";
                            break;
                        }
                        if (this.order.ManagerMark.HasValue)
                        {
                            this.OrderRemarkImageLink.ManagerMarkValue = (int)this.order.ManagerMark.Value;
                            this.litManagerRemark.Text = this.order.ManagerRemark;
                        }
                        else
                        {
                            this.divRemarkShow.Visible = false;
                        }
                        this.comCode        = this.order.ExpressCompanyAbb;
                        this.litRemark.Text = this.order.Remark;
                        string orderId      = this.order.OrderId;
                        string orderMarking = this.order.OrderMarking;
                        if (!string.IsNullOrEmpty(orderMarking))
                        {
                            orderId = orderId + " (" + this.order.PaymentType + "流水号:" + orderMarking + ")";
                        }
                        this.litOrderId.Text  = orderId;
                        this.litUserName.Text = this.order.Username;
                        if (this.order.BalancePayMoneyTotal > 0M)
                        {
                            this.litPayType.Text = "余额支付 ¥" + this.order.BalancePayMoneyTotal.ToString("F2");
                        }
                        decimal num3 = this.order.GetTotal() - this.order.BalancePayMoneyTotal;
                        if (num3 > 0M)
                        {
                            if (!string.IsNullOrEmpty(this.litPayType.Text.Trim()))
                            {
                                this.litPayType.Text = this.litPayType.Text;
                            }
                            if ((num3 - this.order.CouponFreightMoneyTotal) > 0M)
                            {
                                if (!string.IsNullOrEmpty(this.litPayType.Text))
                                {
                                    this.litPayType.Text = this.litPayType.Text + "<br>";
                                }
                                this.litPayType.Text = this.litPayType.Text + (!this.order.PayDate.HasValue ? "待支付" : this.order.PaymentType) + " ¥" + num3.ToString("F2");
                            }
                        }
                        else if (this.order.PaymentTypeId == 0x4d)
                        {
                            this.litPayType.Text = this.order.PaymentType + " ¥" + this.order.PointToCash.ToString("F2");
                        }
                        else if (this.order.PaymentTypeId == 0x37)
                        {
                            this.litPayType.Text = this.order.PaymentType + " ¥" + this.order.RedPagerAmount.ToString("F2");
                        }
                        this.litShipToDate.Text      = this.order.ShipToDate;
                        this.litRealName.Text        = this.order.ShipTo;
                        this.litName.Text            = this.order.ShipTo;
                        this.litExOrderId.Text       = this.order.OrderId;
                        this.txtShipOrderNumber.Text = this.order.ShipOrderNumber;
                        this.OrderStatusLabelHtml.OrderStatusCode = this.order.OrderStatus;
                        this.litUserTel.Text             = string.IsNullOrEmpty(this.order.CellPhone) ? this.order.TelPhone : this.order.CellPhone;
                        this.litShippingRegion.Text      = this.order.ShippingRegion;
                        this.litFreight.Text             = Globals.FormatMoney(this.order.AdjustedFreight);
                        this.BalancePayFreightMoneyTotal = this.order.BalancePayFreightMoneyTotal;
                        this.BalancePayMoneyTotal        = this.order.BalancePayMoneyTotal;
                        if (this.order.ReferralUserId == 0)
                        {
                            this.litSiteName.Text = "主站";
                        }
                        else
                        {
                            DistributorsInfo distributorInfo = DistributorsBrower.GetDistributorInfo(this.order.ReferralUserId);
                            if (distributorInfo != null)
                            {
                                this.litSiteName.Text = distributorInfo.StoreName;
                            }
                        }
                        StringBuilder builder = new StringBuilder();
                        if (!string.IsNullOrEmpty(this.order.ActivitiesName))
                        {
                            this.otherDiscountPrice += this.order.DiscountAmount;
                            builder.Append("<p>" + this.order.ActivitiesName + ":¥" + this.order.DiscountAmount.ToString("F2") + "</p>");
                        }
                        if (!string.IsNullOrEmpty(this.order.ReducedPromotionName))
                        {
                            this.otherDiscountPrice += this.order.ReducedPromotionAmount;
                            builder.Append("<p>" + this.order.ReducedPromotionName + ":¥" + this.order.ReducedPromotionAmount.ToString("F2") + "</p>");
                        }
                        if (!string.IsNullOrEmpty(this.order.CouponName))
                        {
                            this.otherDiscountPrice += this.order.CouponAmount;
                            builder.Append("<p>" + this.order.CouponName + ":¥" + this.order.CouponAmount.ToString("F2") + "</p>");
                        }
                        if (!string.IsNullOrEmpty(this.order.RedPagerActivityName))
                        {
                            this.otherDiscountPrice += this.order.RedPagerAmount;
                            builder.Append("<p>" + this.order.RedPagerActivityName + ":¥" + this.order.RedPagerAmount.ToString("F2") + "</p>");
                        }
                        if (this.order.PointToCash > 0M)
                        {
                            this.otherDiscountPrice += this.order.PointToCash;
                            builder.Append("<p>积分抵现:¥" + this.order.PointToCash.ToString("F2") + "</p>");
                        }
                        this.order.GetAdjustCommssion();
                        decimal num4 = 0M;
                        decimal num5 = 0M;
                        foreach (LineItemInfo info2 in this.order.LineItems.Values)
                        {
                            if (info2.IsAdminModify)
                            {
                                num4 += info2.ItemAdjustedCommssion;
                            }
                            else
                            {
                                num5 += info2.ItemAdjustedCommssion;
                            }
                        }
                        if (num4 != 0M)
                        {
                            if (num4 > 0M)
                            {
                                builder.Append("<p>管理员调价减:¥" + num4.ToString("F2") + "</p>");
                            }
                            else
                            {
                                builder.Append("<p>管理员调价加:¥" + ((num4 * -1M)).ToString("F2") + "</p>");
                            }
                        }
                        if (num5 != 0M)
                        {
                            if (num5 > 0M)
                            {
                                builder.Append("<p>分销商调价减:¥" + num5.ToString("F2") + "</p>");
                            }
                            else
                            {
                                builder.Append("<p>分销商调价加:¥" + ((num5 * -1M)).ToString("F2") + "</p>");
                            }
                        }
                        this.litActivityShow.Text = builder.ToString();
                        if (((int)this.lblOrderStatus.OrderStatusCode) != 4)
                        {
                            this.lbCloseReason.Visible = false;
                        }
                        else
                        {
                            this.divOrderProcess.Visible = false;
                            this.lbReason.Text           = this.order.CloseReason;
                        }
                        if ((this.order.OrderStatus == OrderStatus.BuyerAlreadyPaid) || ((this.order.OrderStatus == OrderStatus.WaitBuyerPay) && (this.order.Gateway == "hishop.plugins.payment.podrequest")))
                        {
                            this.btnSendGoods.Visible = true;
                        }
                        else
                        {
                            this.btnSendGoods.Visible = false;
                        }
                        if (((this.order.OrderStatus == OrderStatus.SellerAlreadySent) || (this.order.OrderStatus == OrderStatus.Finished)) && !string.IsNullOrEmpty(this.order.ExpressCompanyAbb))
                        {
                            this.pLoginsticInfo.Visible  = true;
                            this.btnViewLogistic.Visible = true;
                            if ((Express.GetExpressType() == "kuaidi100") && (this.power != null))
                            {
                                this.power.Visible = true;
                            }
                        }
                        if (this.order.OrderStatus == OrderStatus.WaitBuyerPay)
                        {
                            this.btnClocsOrder.Visible  = true;
                            this.btnModifyPrice.Visible = true;
                        }
                        else
                        {
                            this.btnClocsOrder.Visible  = false;
                            this.btnModifyPrice.Visible = false;
                        }
                        this.btnModifyPrice.Attributes.Add("onclick", "DialogFrame('../trade/EditOrder.aspx?OrderId=" + this.orderId + "&reurl=" + base.Server.UrlEncode(this.reurl) + "','修改订单价格',900,450)");
                        this.BindRemark(this.order);
                        this.ddlpayment.DataBind();
                        this.ddlpayment.SelectedValue = new int?(this.order.PaymentTypeId);
                        this.rptItemList.DataSource   = this.order.LineItems.Values;
                        this.rptItemList.DataBind();
                        string oldAddress = this.order.OldAddress;
                        string str7       = string.Empty;
                        if (!string.IsNullOrEmpty(this.order.ShippingRegion))
                        {
                            str7 = this.order.ShippingRegion.Replace(',', ' ');
                        }
                        if (!string.IsNullOrEmpty(this.order.Address))
                        {
                            str7 = str7 + this.order.Address;
                        }
                        if (!string.IsNullOrEmpty(this.order.ShipTo))
                        {
                            str7 = str7 + "," + this.order.ShipTo;
                        }
                        if (!string.IsNullOrEmpty(this.order.TelPhone))
                        {
                            str7 = str7 + "," + this.order.TelPhone;
                        }
                        if (!string.IsNullOrEmpty(this.order.CellPhone))
                        {
                            str7 = str7 + "," + this.order.CellPhone;
                        }
                        if (string.IsNullOrEmpty(oldAddress))
                        {
                            this.lblOriAddress.Text  = str7;
                            this.pNewAddress.Visible = false;
                        }
                        else
                        {
                            this.lblOriAddress.Text = oldAddress;
                            this.litAddress.Text    = str7;
                        }
                        if ((this.order.OrderStatus == OrderStatus.Finished) || (this.order.OrderStatus == OrderStatus.SellerAlreadySent))
                        {
                            string realModeName = this.order.RealModeName;
                            if (string.IsNullOrEmpty(realModeName))
                            {
                                realModeName = this.order.ModeName;
                            }
                            this.litModeName.Text        = realModeName;
                            this.litShipOrderNumber.Text = this.order.ShipOrderNumber;
                        }
                        else
                        {
                            this.litModeName.Text = this.order.ModeName;
                        }
                        if (!string.IsNullOrEmpty(this.order.ExpressCompanyName))
                        {
                            this.litCompanyName.Text = this.order.ExpressCompanyName;
                            this.hdCompanyCode.Value = this.order.ExpressCompanyAbb;
                        }
                        MemberInfo member = MemberProcessor.GetMember(this.order.UserId, true);
                        if (member != null)
                        {
                            if (!string.IsNullOrEmpty(member.OpenId))
                            {
                                this.litWeiXinNickName.Text = member.UserName;
                            }
                            if (!string.IsNullOrEmpty(member.UserBindName))
                            {
                                this.litUserName.Text = member.UserBindName;
                            }
                        }
                        if (this.order.ReferralUserId > 0)
                        {
                            builder = new StringBuilder();
                            builder.Append("<div class=\"commissionInfo mb20\"><h3>佣金信息</h3><div class=\"commissionInfoInner\">");
                            decimal num6                 = 0M;
                            decimal totalCommssion       = 0M;
                            decimal secondTotalCommssion = 0M;
                            decimal thirdTotalCommssion  = 0M;
                            if (this.order.OrderStatus != OrderStatus.Closed)
                            {
                                totalCommssion       = this.order.GetTotalCommssion();
                                secondTotalCommssion = this.order.GetSecondTotalCommssion();
                                thirdTotalCommssion  = this.order.GetThirdTotalCommssion();
                            }
                            num6 += totalCommssion;
                            string           storeName = string.Empty;
                            DistributorsInfo info4     = DistributorsBrower.GetDistributorInfo(this.order.ReferralUserId);
                            if (info4 != null)
                            {
                                storeName = info4.StoreName;
                                if ((this.order.ReferralPath != null) && (this.order.ReferralPath.Length > 0))
                                {
                                    string[] strArray      = this.order.ReferralPath.Trim().Split(new char[] { '|' });
                                    int      distributorid = 0;
                                    if (strArray.Length > 1)
                                    {
                                        distributorid = Globals.ToNum(strArray[0]);
                                        if (distributorid > 0)
                                        {
                                            info4 = DistributorsBrower.GetDistributorInfo(distributorid);
                                            if (info4 != null)
                                            {
                                                num6 += thirdTotalCommssion;
                                                builder.Append("<p class=\"mb5\"><span>上二级分销商:</span> " + info4.StoreName + "<i> ¥" + thirdTotalCommssion.ToString("F2") + "</i></p>");
                                            }
                                        }
                                        distributorid = Globals.ToNum(strArray[1]);
                                        if (distributorid > 0)
                                        {
                                            info4 = DistributorsBrower.GetDistributorInfo(distributorid);
                                            if (info4 != null)
                                            {
                                                num6 += secondTotalCommssion;
                                                builder.Append("<p class=\"mb5\"><span>上一级分销商:</span> " + info4.StoreName + "<i> ¥" + secondTotalCommssion.ToString("F2") + "</i></p>");
                                            }
                                        }
                                    }
                                    else if (strArray.Length == 1)
                                    {
                                        distributorid = Globals.ToNum(strArray[0]);
                                        if (distributorid > 0)
                                        {
                                            info4 = DistributorsBrower.GetDistributorInfo(distributorid);
                                            if (info4 != null)
                                            {
                                                builder.Append("<p class=\"mb5\"><span>上二级分销商:</span>-</p>");
                                                num6 += secondTotalCommssion;
                                                builder.Append("<p class=\"mb5\"><span>上一级分销商:</span>" + info4.StoreName + " <i> ¥" + secondTotalCommssion.ToString("F2") + "</i></p>");
                                            }
                                        }
                                    }
                                }
                                else
                                {
                                    builder.Append("<p class=\"mb5\"><span>上二级分销商:</span>-</p>");
                                    builder.Append("<p class=\"mb5\"><span>上一级分销商:</span>-</p>");
                                }
                            }
                            builder.Append("<div class=\"clearfix\">");
                            if (num5 > 0M)
                            {
                                string   str10     = " (改价让利¥" + num5.ToString("F2") + ")";
                                string[] strArray2 = new string[7];
                                strArray2[0] = "<p><span>成交店铺:</span> ";
                                strArray2[1] = storeName;
                                strArray2[2] = " <i>¥";
                                decimal num11 = totalCommssion - num5;
                                strArray2[3] = num11.ToString("F2");
                                strArray2[4] = "</i>";
                                strArray2[5] = str10;
                                strArray2[6] = "</p>";
                                builder.Append(string.Concat(strArray2));
                                builder.Append("<p><span>佣金总额:</span><i>¥" + ((num6 - num5)).ToString("F2") + "</i></p>");
                            }
                            else
                            {
                                builder.Append("<p><span>成交店铺:</span> " + storeName + " <i>¥" + totalCommssion.ToString("F2") + "</i></p>");
                                builder.Append("<p><span>佣金总额:</span><i>¥" + num6.ToString("F2") + "</i></p>");
                            }
                            builder.Append("</div></div></div>");
                            this.litCommissionInfo.Text = builder.ToString();
                        }
                        DataTable orderItemsReFundByOrderID = RefundHelper.GetOrderItemsReFundByOrderID(this.orderId);
                        if (orderItemsReFundByOrderID.Rows.Count > 0)
                        {
                            this.rptRefundList.DataSource = orderItemsReFundByOrderID;
                            this.rptRefundList.DataBind();
                        }
                    }
                }
            }
        }