protected override void OnLoad(System.EventArgs e) { if (!this.Page.IsPostBack) { this.LoadControl(); } if (CustomConfigHelper.Instance.BrandShow == false) { if (this.order.OrderStatus == OrderStatus.SellerAlreadySent) { this.edit = " <input type=\"button\" class=\"submit_btnbianji\" id=\"btnedit\" value=\"修改发货单号\" onclick=\"ShowPurchaseOrder();\"/>"; } } if ((this.order.OrderStatus == OrderStatus.SellerAlreadySent || this.order.OrderStatus == OrderStatus.Finished) && !string.IsNullOrEmpty(this.order.ExpressCompanyAbb)) { if (this.plExpress != null) { this.plExpress.Visible = true; } if (Express.GetExpressType() == "kuaidi100" && this.power != null) { this.power.Visible = true; } } this.btnupdatepost.Click += new System.EventHandler(this.btnupdatepost_Click); }
private void BindOrderAddress(OrderInfo order) { this.litShipTo.Text = order.ShipTo; this.litRegion.Text = order.ShippingRegion; this.litAddress.Text = order.Address; this.litZipcode.Text = order.ZipCode; this.litEmail.Text = order.EmailAddress; this.litTellPhone.Text = order.TelPhone; this.litPhone.Text = order.CellPhone; this.litShipToDate.Text = order.ShipToDate; IUser arg_92_0 = HiContext.Current.User; this.litPaymentType.Text = order.PaymentType + "(" + Globals.FormatMoney(order.PayCharge) + ")"; this.litModeName.Text = order.ModeName + "(" + Globals.FormatMoney(order.AdjustedFreight) + ")"; if (order.OrderStatus == OrderStatus.SellerAlreadySent || order.OrderStatus == OrderStatus.Finished) { this.plOrderSended.Visible = true; this.litShippNumber.Text = order.ShipOrderNumber; this.litRealModeName.Text = order.ExpressCompanyName; } if (order.OrderStatus != OrderStatus.SellerAlreadySent && order.OrderStatus != OrderStatus.Finished && order.OrderStatus != OrderStatus.ApplyForReplacement && order.OrderStatus != OrderStatus.ApplyForReturns && order.OrderStatus != OrderStatus.Returned && string.IsNullOrEmpty(order.ExpressCompanyAbb)) { if (this.plExpress != null) { this.plExpress.Visible = true; } if (Express.GetExpressType() == "kuaidi100" && this.power != null) { this.power.Visible = true; } } }
public ExpressDropDownList() { base.Items.Clear(); HttpContext current = HttpContext.Current; string str = string.Empty; if (Express.GetExpressType() == "kuaidi100") { if (current != null) { str = current.Request.MapPath("~/Express.xml"); } XmlDocument document = new XmlDocument(); if (!string.IsNullOrEmpty(str)) { document.Load(str); XmlNode node = document.SelectSingleNode("expressapi"); if (node != null) { XmlNode node2 = node.SelectSingleNode("kuaidi100"); if (node2 != null) { XmlNode node3 = node2.SelectSingleNode("companys"); if ((node3 != null) && (node3.ChildNodes.Count > 0)) { foreach (XmlNode node4 in node3) { base.Items.Add(new ListItem(node4["name"].InnerText.ToString(), node4["abb"].InnerText.ToString())); } } } } } } }
private void LoadUserControl() { itemsList.Order = base.Order; userInfo.UserId = base.Order.UserId; userInfo.Order = base.Order; chargesList.Order = base.Order; shippingAddress.Order = base.Order; if (Express.GetExpressType() == "kuaidi100") { power.Visible = true; } }
private void BindOrderAddress(OrderInfo order) { this.litShipTo.Text = order.ShipTo; this.litRegion.Text = order.ShippingRegion; this.litAddress.Text = order.Address; this.litZipcode.Text = order.ZipCode; this.litEmail.Text = order.EmailAddress; this.litTellPhone.Text = order.TelPhone; this.litPhone.Text = order.CellPhone; this.litShipToDate.Text = order.ShipToDate; Member member = HiContext.Current.User as Member; this.litUserName.Text = member.Username; this.litUserAddress.Text = RegionHelper.GetFullRegion(member.RegionId, "") + member.Address; this.litUserTellPhone.Text = member.TelPhone; this.litUserPhone.Text = member.CellPhone; this.litUserEmail.Text = member.Email; this.litUserQQ.Text = member.QQ; this.litUserMSN.Text = member.MSN; this.litPaymentType.Text = order.PaymentType + "(" + Globals.FormatMoney(order.PayCharge) + ")"; this.litModeName.Text = order.ModeName + "(" + Globals.FormatMoney(order.AdjustedFreight) + ")"; if (order.OrderStatus == OrderStatus.SellerAlreadySent || order.OrderStatus == OrderStatus.Finished) { this.plOrderSended.Visible = true; this.litShippNumber.Text = order.ShipOrderNumber; this.litRealModeName.Text = order.ExpressCompanyName; } bool arg_1E4_0; if (order.OrderStatus != OrderStatus.SellerAlreadySent) { if (order.OrderStatus != OrderStatus.Finished) { arg_1E4_0 = true; goto IL_1E4; } } arg_1E4_0 = string.IsNullOrEmpty(order.ExpressCompanyAbb); IL_1E4: if (!arg_1E4_0) { if (this.plExpress != null) { this.plExpress.Visible = true; } if (Express.GetExpressType() == "kuaidi100" && this.power != null) { this.power.Visible = true; } } }
private void LoadUserControl() { itemsList.PurchaseOrder = base.purchaseOrder; chargesList.PurchaseOrder = base.purchaseOrder; shippingAddress.PurchaseOrder = base.purchaseOrder; if (!string.IsNullOrEmpty(base.purchaseOrder.ExpressCompanyAbb)) { plExpress.Visible = true; if (Express.GetExpressType() == "kuaidi100") { power.Visible = true; } } }
void BindOrderAddress(OrderInfo order) { this.litShipTo.Text = order.ShipTo; this.litRegion.Text = order.ShippingRegion; this.litAddress.Text = order.Address; this.litZipcode.Text = order.ZipCode; this.litEmail.Text = order.EmailAddress; this.litTellPhone.Text = order.TelPhone; this.litPhone.Text = order.CellPhone; Member user = HiContext.Current.User as Member; this.litUserName.Text = user.Username; this.litUserAddress.Text = RegionHelper.GetFullRegion(user.RegionId, "") + user.Address; this.litUserTellPhone.Text = user.TelPhone; this.litUserPhone.Text = user.CellPhone; this.litUserEmail.Text = user.Email; this.litUserQQ.Text = user.QQ; this.litUserMSN.Text = user.MSN; this.litPaymentType.Text = order.PaymentType + "(" + Globals.FormatMoney(order.AdjustedPayCharge) + ")"; this.litModeName.Text = order.ModeName + "(" + Globals.FormatMoney(order.AdjustedFreight) + ")"; this.litDiscountName.Text = order.DiscountName; this.litDiscountName.NavigateUrl = string.Format(Globals.GetSiteUrls().UrlData.FormatUrl("FavourableDetails"), order.DiscountId); this.litDiscountName.Target = "_blank"; this.litFreeName.Text = order.ActivityName; this.litFreeName.NavigateUrl = string.Format(Globals.GetSiteUrls().UrlData.FormatUrl("FavourableDetails"), order.ActivityId); this.litFreeName.Target = "_blank"; if ((order.OrderStatus == OrderStatus.SellerAlreadySent) || (order.OrderStatus == OrderStatus.Finished)) { this.plOrderSended.Visible = true; this.litShippNumber.Text = order.ShipOrderNumber; this.litRealModeName.Text = order.ExpressCompanyName; } if (order.OrderOptions.Count > 0) { this.plOrderOption.Visible = true; this.grdOrderOption.DataSource = order.OrderOptions; this.grdOrderOption.DataBind(); } if (((order.OrderStatus == OrderStatus.SellerAlreadySent) || (order.OrderStatus == OrderStatus.Finished)) && !string.IsNullOrEmpty(order.ExpressCompanyAbb)) { if (this.plExpress != null) { this.plExpress.Visible = true; } if ((Express.GetExpressType() == "kuaidi100") && (this.power != null)) { this.power.Visible = true; } } }
private XmlDocument GetXmlNode() { XmlDocument document = new XmlDocument(); HttpContext current = HttpContext.Current; if (Express.GetExpressType() == "kuaidi100") { if (current != null) { path = current.Request.MapPath("~/Express.xml"); } if (!string.IsNullOrEmpty(path)) { document.Load(path); } } return(document); }
public void BindExpressCheckBoxList() { base.Items.Clear(); HttpContext current = HttpContext.Current; string str = string.Empty; if (Express.GetExpressType() == "kuaidi100") { if (current != null) { str = current.Request.MapPath("~/Express.xml"); } XmlDocument document = new XmlDocument(); if (!string.IsNullOrEmpty(str)) { document.Load(str); XmlNode node = document.SelectSingleNode("expressapi"); if (node != null) { XmlNode node2 = node.SelectSingleNode("kuaidi100"); if (node2 != null) { XmlNode node3 = node2.SelectSingleNode("companys"); if ((node3 != null) && (node3.ChildNodes.Count > 0)) { foreach (XmlNode node4 in node3) { ListItem item = new ListItem(node4["name"].InnerText.ToString(), node4["abb"].InnerText.ToString()); foreach (ExpressCompanyInfo info in this.ExpressCompany) { if ((string.Compare(item.Value, info.ExpressCompanyAbb, false) == 0) && (string.Compare(item.Text, info.ExpressCompanyName, false) == 0)) { item.Selected = true; } } base.Items.Add(item); } } } } } } }
protected override void OnLoad(System.EventArgs e) { if (!this.Page.IsPostBack) { this.LoadControl(); } OrderStatus arg_1E_0 = this.order.OrderStatus; if ((this.order.OrderStatus == OrderStatus.SellerAlreadySent || this.order.OrderStatus == OrderStatus.Finished) && !string.IsNullOrEmpty(this.order.ExpressCompanyAbb)) { if (this.plExpress != null) { this.plExpress.Visible = true; } if (Express.GetExpressType() == "kuaidi100" && this.power != null) { this.power.Visible = true; } } this.btnupdatepost.Click += new System.EventHandler(this.btnupdatepost_Click); }
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(); } } } } }
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(); } }
public void LoadControl() { string shippingRegion = string.Empty; if (!string.IsNullOrEmpty(this.PurchaseOrder.ShippingRegion)) { shippingRegion = this.PurchaseOrder.ShippingRegion; } if (!string.IsNullOrEmpty(this.PurchaseOrder.Address)) { shippingRegion = shippingRegion + this.PurchaseOrder.Address; } if (!string.IsNullOrEmpty(this.PurchaseOrder.ZipCode)) { shippingRegion = shippingRegion + "," + this.PurchaseOrder.ZipCode; } if (!string.IsNullOrEmpty(this.PurchaseOrder.ShipTo)) { shippingRegion = shippingRegion + "," + this.PurchaseOrder.ShipTo; } if (!string.IsNullOrEmpty(this.PurchaseOrder.TelPhone)) { shippingRegion = shippingRegion + "," + this.PurchaseOrder.TelPhone; } if (!string.IsNullOrEmpty(this.PurchaseOrder.CellPhone)) { shippingRegion = shippingRegion + "," + this.PurchaseOrder.CellPhone; } this.lblShipAddress.Text = shippingRegion; this.litShipToDate.Text = this.PurchaseOrder.ShipToDate; if ((this.PurchaseOrder.PurchaseStatus == OrderStatus.Finished) || (this.PurchaseOrder.PurchaseStatus == OrderStatus.SellerAlreadySent)) { this.litModeName.Text = this.PurchaseOrder.RealModeName; this.ltrShipNum.Text = " 物流单号:" + this.PurchaseOrder.ShipOrderNumber; } else { this.litModeName.Text = this.PurchaseOrder.ModeName; } if (!string.IsNullOrEmpty(this.purchaseOrder.ExpressCompanyName)) { this.litCompanyName.Text = this.purchaseOrder.ExpressCompanyName; this.tr_company.Visible = true; } this.txtRemark.Text = Globals.HtmlDecode(this.PurchaseOrder.Remark); this.lblPurchaseDate.Time = this.PurchaseOrder.PurchaseDate; if ((this.purchaseOrder.PurchaseStatus == OrderStatus.WaitBuyerPay) || (this.purchaseOrder.PurchaseStatus == OrderStatus.BuyerAlreadyPaid)) { this.btnSaveRemark.Enabled = true; } else { this.btnSaveRemark.Enabled = false; } if (((this.PurchaseOrder.PurchaseStatus == OrderStatus.SellerAlreadySent) || (this.PurchaseOrder.PurchaseStatus == OrderStatus.Finished)) && !string.IsNullOrEmpty(this.PurchaseOrder.ExpressCompanyAbb)) { if (this.plExpress != null) { this.plExpress.Visible = true; } if ((Express.GetExpressType() == "kuaidi100") && (this.power != null)) { this.power.Visible = true; } } }
public void LoadControl() { string shippingRegion = string.Empty; if (!string.IsNullOrEmpty(this.order.ShippingRegion)) { shippingRegion = this.order.ShippingRegion; } if (!string.IsNullOrEmpty(this.order.Address)) { shippingRegion = shippingRegion + this.order.Address; } if (!string.IsNullOrEmpty(this.order.ShipTo)) { shippingRegion = shippingRegion + " " + this.order.ShipTo; } if (!string.IsNullOrEmpty(this.order.ZipCode)) { shippingRegion = shippingRegion + " " + this.order.ZipCode; } if (!string.IsNullOrEmpty(this.order.TelPhone)) { shippingRegion = shippingRegion + " " + this.order.TelPhone; } if (!string.IsNullOrEmpty(this.order.CellPhone)) { shippingRegion = shippingRegion + " " + this.order.CellPhone; } this.lblShipAddress.Text = shippingRegion; if (this.order.OrderStatus == OrderStatus.WaitBuyerPay) { this.lkBtnEditShippingAddress.Visible = true; } this.litShipToDate.Text = this.order.ShipToDate; if ((this.order.OrderStatus == OrderStatus.Finished) || (this.order.OrderStatus == OrderStatus.SellerAlreadySent)) { this.litModeName.Text = this.order.RealModeName; this.ltrShipNum.Text = " 物流单号:" + this.order.ShipOrderNumber; } else { this.litModeName.Text = this.order.ModeName; } if (!string.IsNullOrEmpty(this.order.ExpressCompanyName)) { this.litCompanyName.Text = this.order.ExpressCompanyName; this.tr_company.Visible = true; } this.litRemark.Text = this.order.Remark; if (((this.order.OrderStatus == OrderStatus.SellerAlreadySent) || (this.order.OrderStatus == OrderStatus.Finished)) && !string.IsNullOrEmpty(this.order.ExpressCompanyAbb)) { if (this.plExpress != null) { this.plExpress.Visible = true; } if ((Express.GetExpressType() == "kuaidi100") && (this.power != null)) { this.power.Visible = true; } } }
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(); } } } } }
protected void Page_Load(object sender, EventArgs e) { wid = GetCurWebId(); if (string.IsNullOrEmpty(wid)) { return; } this.reurl = "OrderDetails.aspx?OrderId=" + this.orderId + "&t=" + DateTime.Now.ToString("HHmmss"); this.btnMondifyPay.Click += new EventHandler(this.btnMondifyPay_Click); this.btnMondifyShip.Click += new EventHandler(this.btnMondifyShip_Click); this.btnCloseOrder.Click += new EventHandler(this.btnCloseOrder_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.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; this.litOrderId.Text = this.order.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>"); } decimal adjustCommssion = this.order.GetAdjustCommssion(); if (adjustCommssion > 0M) { this.otherDiscountPrice -= adjustCommssion; builder.Append("<p>管理员调价优惠:¥" + adjustCommssion.ToString("F2") + "</p>"); } else if (adjustCommssion < 0M) { this.otherDiscountPrice -= adjustCommssion; builder.Append("<p>管理员调价增加:¥" + adjustCommssion.ToString("F2").Trim(new char[] { '-' }) + "</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.ddlshippingMode.DataBind(); this.ddlshippingMode.SelectedValue = new int?(this.order.ShippingModeId); 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 str2 = string.Empty; if (!string.IsNullOrEmpty(this.order.ShippingRegion)) { str2 = this.order.ShippingRegion.Replace(',', ' '); } if (!string.IsNullOrEmpty(this.order.Address)) { str2 = str2 + this.order.Address; } if (!string.IsNullOrEmpty(this.order.ShipTo)) { str2 = str2 + " " + this.order.ShipTo; } if (!string.IsNullOrEmpty(this.order.ZipCode)) { str2 = str2 + " " + this.order.ZipCode; } if (!string.IsNullOrEmpty(this.order.TelPhone)) { str2 = str2 + " " + this.order.TelPhone; } if (!string.IsNullOrEmpty(this.order.CellPhone)) { str2 = str2 + " " + this.order.CellPhone; } if (string.IsNullOrEmpty(oldAddress)) { this.lblOriAddress.Text = str2; this.pNewAddress.Visible = false; } else { this.lblOriAddress.Text = oldAddress; this.litAddress.Text = str2; } 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; } MemberInfo member = MemberProcessor.GetMember(this.order.UserId, true); if ((member != null) && !string.IsNullOrEmpty(member.OpenId)) { this.litWeiXinNickName.Text = member.UserName; } if (this.order.ReferralUserId > 0) { builder = new StringBuilder(); builder.Append("<div class=\"commissionInfo mb20\"><h3>佣金信息</h3><div class=\"commissionInfoInner\">"); decimal num2 = 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(); } num2 += totalCommssion; string storeName = string.Empty; DistributorsInfo info3 = DistributorsBrower.GetDistributorInfo(this.order.ReferralUserId); if (info3 != null) { storeName = info3.StoreName; if ((info3.ReferralPath != null) && (info3.ReferralPath.Length > 0)) { string[] strArray = info3.ReferralPath.Trim().Split(new char[] { '|' }); int distributorid = 0; if (strArray.Length > 1) { distributorid = Globals.ToNum(strArray[0]); if (distributorid > 0) { info3 = DistributorsBrower.GetDistributorInfo(distributorid); if (info3 != null) { num2 += thirdTotalCommssion; builder.Append("<p class=\"mb5\"><span>上二级分销商:</span> " + info3.StoreName + "<i>¥" + thirdTotalCommssion.ToString("F2") + "</i></p>"); } } distributorid = Globals.ToNum(strArray[1]); if (distributorid > 0) { info3 = DistributorsBrower.GetDistributorInfo(distributorid); if (info3 != null) { num2 += secondTotalCommssion; builder.Append("<p class=\"mb5\"><span>上一级分销商:</span> " + info3.StoreName + "<i>¥" + secondTotalCommssion.ToString("F2") + "</i></p>"); } } } else if (strArray.Length == 1) { distributorid = Globals.ToNum(strArray[0]); if (distributorid > 0) { info3 = DistributorsBrower.GetDistributorInfo(distributorid); if (info3 != null) { builder.Append("<p class=\"mb5\"><span>上二级分销商:</span>-</p>"); num2 += secondTotalCommssion; builder.Append("<p class=\"mb5\"><span>上一级分销商:</span>" + info3.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\">"); builder.Append("<p><span>成交店铺:</span>" + storeName + " <i>¥" + totalCommssion.ToString("F2") + "</i></p>"); builder.Append("<p><span>佣金总额:</span><i>¥" + num2.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(); } } //Page.DataBind(); } }