protected override void AttachChildControls() { this.calendarStartDate = (CalendarPanel)this.FindControl("calendarStartDate"); this.calendarEndDate = (CalendarPanel)this.FindControl("calendarEndDate"); this.hdorderId = (HtmlInputHidden)this.FindControl("hdorderId"); this.txtOrderId = (TextBox)this.FindControl("txtOrderId"); this.txtProductName = (TextBox)this.FindControl("txtProductName"); this.txtShipId = (TextBox)this.FindControl("txtShipId"); this.txtShipTo = (TextBox)this.FindControl("txtShipTo"); this.txtRemark = (TextBox)this.FindControl("txtRemark"); this.txtReturnRemark = (TextBox)this.FindControl("txtReturnRemark"); this.txtReplaceRemark = (TextBox)this.FindControl("txtReplaceRemark"); this.dropOrderStatus = (OrderStautsDropDownList)this.FindControl("dropOrderStatus"); this.dropPayType = (DropDownList)this.FindControl("dropPayType"); this.btnPay = ButtonManager.Create(this.FindControl("btnPay")); this.imgbtnSearch = (Button)this.FindControl("imgbtnSearch"); this.litOrderTotal = (Literal)this.FindControl("litOrderTotal"); this.listOrders = (Common_OrderManage_OrderList)this.FindControl("Common_OrderManage_OrderList"); this.pager = (Pager)this.FindControl("pager"); this.demodiv = (HtmlGenericControl)this.FindControl("demodiv"); SiteSettings masterSettings = SettingsManager.GetMasterSettings(); this.demodiv.Visible = masterSettings.IsDemoSite; this.imgbtnSearch.Click += this.imgbtnSearch_Click; this.btnPay.Click += this.btnPay_Click; this.listOrders.ItemDataBound += this.listOrders_ItemDataBound; this.listOrders.ItemCommand += this.listOrders_ItemCommand; PageTitle.AddSiteNameTitle("我的订单"); if (!this.Page.IsPostBack) { IList <PaymentModeInfo> paymentModes = TradeHelper.GetPaymentModes(PayApplicationType.payOnPC); PaymentModeInfo paymentModeInfo = (from p in paymentModes where p.Gateway.ToLower() == "hishop.plugins.payment.podrequest" select p).FirstOrDefault(); PaymentModeInfo paymentModeInfo2 = (from p in paymentModes where p.Gateway.ToLower() == "hishop.plugins.payment.bankrequest" select p).FirstOrDefault(); if (paymentModeInfo != null) { paymentModes.Remove(paymentModeInfo); } if (paymentModeInfo2 != null) { paymentModes.Remove(paymentModeInfo2); } this.dropPayType.DataSource = paymentModes; this.dropPayType.DataTextField = "Name"; this.dropPayType.DataValueField = "ModeId"; this.dropPayType.DataBind(); string text = ""; for (int i = 0; i < this.dropPayType.Items.Count; i++) { text = paymentModes[i].Gateway; this.dropPayType.Items[i].Attributes["Gateway"] = text; AttributeCollection attributes = this.dropPayType.Items[i].Attributes; bool flag = TradeHelper.GatewayIsCanBackReturn(text) || text == "hishop.plugins.payment.advancerequest"; attributes["IsBackReturn"] = flag.ToString().ToLower(); } this.BindOrders(); } }
protected override void AttachChildControls() { this.hidErrorMsg = (HtmlInputHidden)this.FindControl("hidErrorMsg"); this.txtOrderId = (HtmlInputHidden)this.FindControl("txtOrderId"); this.litOrderIds = (Literal)this.FindControl("litOrderIds"); this.txtSkuId = (HtmlInputHidden)this.FindControl("txtSkuId"); this.txtRemark = (TextBox)this.FindControl("txtRemark"); this.litRefundMoney = (Literal)this.FindControl("litRefundMoney"); this.dropRefundType = (WapRefundTypeDropDownList)this.FindControl("dropRefundType"); this.DropRefundReason = (WapAfterSalesReasonDropDownList)this.FindControl("RefundReasonDropDownList"); this.btnRefund = ButtonManager.Create(this.FindControl("btnRefund")); this.groupbuyPanel = (HtmlGenericControl)this.FindControl("groupbuyPanel"); this.hidOneRefundAmount = (HtmlInputHidden)this.FindControl("hidOneRefundAmount"); this.hidIsServiceOrder = (HtmlInputHidden)this.FindControl("hidIsServiceOrder"); this.hidValidCodes = (HtmlInputHidden)this.FindControl("hidValidCodes"); this.rptOrderPassword = (WapTemplatedRepeater)this.FindControl("rptOrderPassword"); decimal num = default(decimal); decimal d = default(decimal); this.txtOrderId.Value = this.OrderId; this.litOrderIds.Text = this.OrderId; this.txtSkuId.Value = this.SkuId; this.order = TradeHelper.GetOrderInfo(this.OrderId); if (this.order == null) { this.ShowError("错误的订单信息!"); } else { this.IsServiceOrder = (this.order.OrderType == OrderType.ServiceOrder); this.hidIsServiceOrder.Value = (this.IsServiceOrder ? "1" : "0"); this.hidOneRefundAmount.Value = "0"; if (this.order.FightGroupId > 0) { FightGroupInfo fightGroup = VShopHelper.GetFightGroup(this.order.FightGroupId); if (fightGroup.Status != FightGroupStatus.FightGroupSuccess) { this.ShowError("火拼团订单成团之前不能进行退款操作!"); return; } } GroupBuyInfo groupBuyInfo = null; if (this.order.GroupBuyId > 0) { groupBuyInfo = ProductBrowser.GetGroupBuy(this.order.GroupBuyId); if (groupBuyInfo != null) { if (this.groupbuyPanel != null && groupBuyInfo.Status != GroupBuyStatus.Failed) { this.groupbuyPanel.Visible = true; } if (groupBuyInfo.NeedPrice >= this.order.GetTotal(false) && groupBuyInfo.Status != GroupBuyStatus.Failed) { this.ShowError("团购违约金大于等于订单总金额,不能进行退款申请!"); return; } } num = this.order.GetCanRefundAmount(this.SkuId, groupBuyInfo, 0); } else { num = this.order.GetCanRefundAmount(this.SkuId, null, 0); } if (!this.IsServiceOrder) { if (TradeHelper.IsOnlyOneSku(this.order)) { this.SkuId = ""; } if (!string.IsNullOrEmpty(this.SkuId) && !this.order.LineItems.ContainsKey(this.SkuId)) { this.ShowError("错误的商品信息!"); return; } if (!TradeHelper.CanRefund(this.order, this.SkuId)) { this.ShowError("订单状态不正确或者已有未处理完成的退款/退货申请!"); return; } if (this.order.LineItems.ContainsKey(this.SkuId)) { this.RefundItem = this.order.LineItems[this.SkuId]; } } else { if (this.order.OrderStatus == OrderStatus.WaitBuyerPay || this.order.OrderStatus == OrderStatus.Closed || this.order.OrderStatus == OrderStatus.ApplyForRefund || this.order.OrderStatus == OrderStatus.Refunded) { this.ShowError("订单状态不正确,不能申请退款!"); } bool flag = TradeHelper.GatewayIsCanBackReturn(this.order.Gateway); bool flag2 = this.order.Gateway.ToLower() == "hishop.plugins.payment.cashreceipts" && this.order.StoreId > 0 && this.order.ShippingModeId == -2; MemberInfo user = Users.GetUser(this.order.UserId); LineItemInfo lineItemInfo = this.order.LineItems.Values.FirstOrDefault(); if (!lineItemInfo.IsRefund) { this.ShowError("商品不支持退款!"); } if (!lineItemInfo.IsValid && lineItemInfo.ValidEndDate.HasValue && lineItemInfo.ValidEndDate.Value < DateTime.Now && !lineItemInfo.IsOverRefund) { this.ShowError("已过有效期,不能申请退款!"); } IList <OrderVerificationItemInfo> orderVerificationItems = TradeHelper.GetOrderVerificationItems(this.order.OrderId); if (orderVerificationItems == null || orderVerificationItems.Count == 0) { this.ShowError("核销码为空!"); } IList <OrderVerificationItemInfo> list = null; list = ((!lineItemInfo.ValidEndDate.HasValue || !(lineItemInfo.ValidEndDate.Value < DateTime.Now) || !lineItemInfo.IsOverRefund) ? (from vi in orderVerificationItems where vi.VerificationStatus == 0 select vi).ToList() : (from vi in orderVerificationItems where vi.VerificationStatus == 0 || vi.VerificationStatus == 3 select vi).ToList()); if (list == null || list.Count == 0) { this.ShowError("没有可以退款的核销码!"); } DataTable dataTable = new DataTable(); dataTable.Columns.Add(new DataColumn("Index")); dataTable.Columns.Add(new DataColumn("Password")); for (int j = 0; j < list.Count; j++) { DataRow dataRow = dataTable.NewRow(); dataRow["Index"] = j + 1; dataRow["Password"] = list[j].VerificationPassword; dataTable.Rows.Add(dataRow); } this.rptOrderPassword.DataSource = dataTable; this.rptOrderPassword.DataBind(); d = (this.order.GetTotal(false) / (decimal)lineItemInfo.Quantity).F2ToString("f2").ToDecimal(0); this.hidValidCodes.Value = string.Join(",", (from i in list select i.VerificationPassword).ToList()); this.hidOneRefundAmount.Value = d.ToString(); num = d * (decimal)list.Count; } if (num < decimal.Zero) { this.ShowError("订单中已申请的退款金额超过了订单总额!"); } else { this.litRefundMoney.Text = num.F2ToString("f2"); PageTitle.AddSiteNameTitle("我的订单"); if (!this.Page.IsPostBack) { this.dropRefundType.IsServiceOrder = (this.order.OrderType == OrderType.ServiceOrder); this.DropRefundReason.IsRefund = true; this.dropRefundType.preSaleId = this.order.PreSaleId; string enumDescription = EnumDescription.GetEnumDescription((Enum)(object)EnumPaymentType.AdvancePay, 1); this.dropRefundType.OrderGateWay = ((this.order.PreSaleId > 0 && this.order.DepositGatewayOrderId.ToNullString().ToLower() == enumDescription) ? enumDescription : this.order.Gateway); this.dropRefundType.BalanceAmount = this.order.BalanceAmount; } } } }
private void btnPay_Click(object sender, EventArgs e) { string value = this.hdorderId.Value; int modeId = 0; int.TryParse(this.dropPayType.SelectedValue, out modeId); PaymentModeInfo paymentMode = TradeHelper.GetPaymentMode(modeId); OrderInfo orderInfo = TradeHelper.GetOrderInfo(value); string msg = ""; if (!TradeHelper.CheckOrderStock(orderInfo, out msg)) { this.ShowMessage(msg, false, "", 1); } else { IList <string> list = new List <string>(); list.Add("hishop.plugins.payment.podrequest"); list.Add("hishop.plugins.payment.bankrequest"); if (orderInfo.CountDownBuyId > 0) { if (list.Contains(paymentMode.Gateway.ToLower().Trim())) { msg = "限购的订单不支持货到付款和线下支付"; this.ShowMessage(msg, false, "", 1); return; } foreach (LineItemInfo value2 in orderInfo.LineItems.Values) { CountDownInfo countDownInfo = TradeHelper.CheckUserCountDown(value2.ProductId, orderInfo.CountDownBuyId, value2.SkuId, HiContext.Current.UserId, orderInfo.GetAllQuantity(true), orderInfo.OrderId, out msg, orderInfo.StoreId); if (countDownInfo == null) { this.ShowMessage(msg, false, "", 1); return; } } } if (orderInfo.FightGroupId > 0) { if (paymentMode == null || (!TradeHelper.GatewayIsCanBackReturn(paymentMode.Gateway) && paymentMode.Gateway != EnumDescription.GetEnumDescription((Enum)(object)EnumPaymentType.AdvancePay, 1))) { this.ShowMessage("火拼团订单不支付该支付方式进行支付", false, "", 1); return; } foreach (KeyValuePair <string, LineItemInfo> lineItem in orderInfo.LineItems) { FightGroupActivityInfo fightGroupActivityInfo = VShopHelper.CheckUserFightGroup(lineItem.Value.ProductId, orderInfo.FightGroupActivityId, orderInfo.FightGroupId, lineItem.Value.SkuId, HiContext.Current.UserId, orderInfo.GetAllQuantity(true), orderInfo.OrderId, lineItem.Value.Quantity, out msg); if (fightGroupActivityInfo == null) { this.ShowMessage(msg, false, "", 1); return; } } } if (orderInfo.GroupBuyId > 0 && list.Contains(paymentMode.Gateway.ToLower().Trim())) { msg = "团购的订单不支持货到付款和线下支付"; this.ShowMessage(msg, false, "", 1); } else { if (orderInfo.PreSaleId > 0) { if (paymentMode.Gateway.ToLower().Trim() == "hishop.plugins.payment.podrequest") { this.ShowMessage("预售订单不支持货到付款", false, "", 1); return; } ProductPreSaleInfo productPreSaleInfo = ProductPreSaleHelper.GetProductPreSaleInfo(orderInfo.PreSaleId); if (productPreSaleInfo == null) { this.ShowMessage("预售活动不存在,不能支付", false, "", 1); return; } if (!orderInfo.DepositDate.HasValue && orderInfo.OrderStatus == OrderStatus.WaitBuyerPay && productPreSaleInfo.PreSaleEndDate < DateTime.Now) { this.ShowMessage("您支付晚了,预售活动已经结束", false, "", 1); return; } if (orderInfo.DepositDate.HasValue && orderInfo.OrderStatus == OrderStatus.WaitBuyerPay) { if (productPreSaleInfo.PaymentStartDate > DateTime.Now) { this.ShowMessage("尾款支付尚未开始", false, "", 1); return; } DateTime dateTime = productPreSaleInfo.PaymentEndDate; DateTime date = dateTime.Date; dateTime = DateTime.Now; if (date < dateTime.Date) { this.ShowMessage("尾款支付已结束", false, "", 1); return; } } } if (paymentMode != null) { orderInfo.PaymentTypeId = paymentMode.ModeId; orderInfo.PaymentType = paymentMode.Name; orderInfo.Gateway = paymentMode.Gateway; TradeHelper.UpdateOrderPaymentType(orderInfo); } this.Page.Response.Redirect(base.GetRouteUrl("sendPayment", new { orderId = value })); } } }
public void LoadOrderInfo() { PaymentModeInfo paymentMode = TradeHelper.GetPaymentMode(ShoppingProcessor.GetPaymentGateway(EnumPaymentType.OfflinePay)); if (paymentMode != null) { this.litOfflinePayContent.SetWhenIsNotNull(paymentMode.Description); } this.hidOrderid.Value = this.orderId; OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(this.orderId); if (orderInfo == null || (orderInfo.UserId != 0 && orderInfo.UserId != HiContext.Current.UserId)) { base.GotoResourceNotFound(); return; } MemberInfo user = Users.GetUser(HiContext.Current.UserId); this.hidHasTradePassword.Value = (string.IsNullOrWhiteSpace(user.TradePassword) ? "0" : "1"); if (orderInfo.ParentOrderId == "-1") { this.orderLink.HRef = base.GetRouteUrl("user_OrderList", new { ParentOrderId = this.orderId }); this.litOrderId.Text = OrderHelper.GetOrderIdsByParent(orderInfo.OrderId).Replace(",", " "); } else { this.orderLink.HRef = base.GetRouteUrl("user_OrderDetails", new { OrderId = this.orderId }); this.litOrderId.Text = orderInfo.OrderId; } IList <string> paymentTypes = new List <string>(); paymentTypes.Add("hishop.plugins.payment.podrequest"); paymentTypes.Add("hishop.plugins.payment.bankrequest"); paymentTypes.Add("hishop.plugins.payment.advancerequest"); if (orderInfo.PreSaleId > 0) { this.litOrderPrice.Money = orderInfo.Deposit + orderInfo.FinalPayment; } else { this.litOrderPrice.Money = orderInfo.GetTotal(false); } if (orderInfo.PreSaleId > 0) { this.hidIsPreSale.Value = "1"; if (!orderInfo.DepositDate.HasValue) { this.litDeposittxt.Text = "定金:"; this.litDeposit.Money = orderInfo.Deposit; } else { this.litDeposittxt.Text = "尾款:"; this.litDeposit.Money = orderInfo.FinalPayment; } } this.onlinePayPanel.Visible = false; this.offlinePayPanel.Visible = false; int num; if ((orderInfo.PaymentTypeId != -3 || orderInfo.PaymentTypeId != -2) && orderInfo.Gateway != "hishop.plugins.payment.bankrequest" && orderInfo.PaymentType != "到店支付" && orderInfo.Gateway != "hishop.plugins.payment.podrequest") { num = ((orderInfo.OrderStatus == OrderStatus.WaitBuyerPay) ? 1 : 0); goto IL_02ea; } num = 0; goto IL_02ea; IL_02ea: if (num != 0) { this.onlinePayPanel.Visible = true; } else if (orderInfo.Gateway == "hishop.plugins.payment.bankrequest") { this.offlinePayPanel.Visible = true; } string text = ""; text = ((orderInfo.CountDownBuyId <= 0) ? (HiContext.Current.SiteSettings.CloseOrderDays + "天") : (HiContext.Current.SiteSettings.CountDownTime + "分钟")); PaymentModeInfo paymentMode2 = TradeHelper.GetPaymentMode("hishop.plugins.payment.podrequest"); bool flag = false; if ((orderInfo.Gateway == "hishop.plugins.payment.podrequest" || (paymentMode2 != null && paymentMode2.ModeId == orderInfo.PaymentTypeId)) && orderInfo.PreSaleId <= 0) { flag = true; } switch (orderInfo.OrderStatus) { case OrderStatus.WaitBuyerPay: if (base.GetParameter("t", false).ToNullString() == "1") { this.promptMsg.InnerHtml = "银行系统可能会出现延时,如您已经支付,请耐心等待或者联系商家客服!"; this.msgTitle.InnerHtml = "付款不成功,请重新支付!"; this.divfinish.Visible = true; this.onlinePayPanel.Visible = false; this.divOrderPayInfo.Visible = false; this.imgPayResult.Src = "/templates/pccommon/images/cart/ordererror.png"; } if (orderInfo.PreSaleId > 0) { if (orderInfo.DepositDate.HasValue) { this.promptMsg.InnerHtml = "定金支付成功,请按时支付尾款。"; this.msgTitle.InnerHtml = "恭喜您,您的定金已支付成功!"; } else { this.promptMsg.InnerHtml = "请支付定金。"; this.msgTitle.InnerHtml = "订单提交成功,请您尽快支付定金!"; } this.divfinish.Visible = true; } if (flag) { this.msgTitle.InnerHtml = "货到付款订单提交成功,平台将及时给您发货"; } break; case OrderStatus.BuyerAlreadyPaid: if (orderInfo.PaymentType == "上门自提") { this.promptMsg.InnerHtml = "您的订单已支付成功,平台将及时给您备货。"; this.msgTitle.InnerHtml = "恭喜您,您的订单已支付成功!"; } else { this.promptMsg.InnerHtml = "您的订单已支付成功,平台将及时给您发货。"; this.msgTitle.InnerHtml = "恭喜您,您的订单已支付成功!"; } this.divfinish.Visible = true; break; case OrderStatus.Closed: this.promptMsg.InnerHtml = "您的订单已关闭,关闭原因:" + orderInfo.CloseReason + "。"; this.msgTitle.InnerHtml = "您的订单已关闭!"; this.divfinish.Visible = true; break; case OrderStatus.Finished: this.promptMsg.InnerHtml = "您的订单已完成."; this.msgTitle.InnerHtml = "恭喜您,您的订单已完成!"; this.divfinish.Visible = true; break; case OrderStatus.SellerAlreadySent: this.promptMsg.InnerHtml = "您的订单已发货,请注意收货。"; this.msgTitle.InnerHtml = "恭喜您,您的订单已发货!"; this.divfinish.Visible = true; break; default: this.promptMsg.InnerHtml = "您的订单已提交成功。"; this.divfinish.Visible = true; break; } if (orderInfo.OrderStatus == OrderStatus.BuyerAlreadyPaid) { this.promptMsg.InnerHtml = "您的订单已支付成功,平台将及时给您发货。"; } else if (orderInfo.PaymentTypeId != -3 && !flag && orderInfo.OrderStatus == OrderStatus.WaitBuyerPay) { DateTime dateTime; if (base.GetParameter("t", false).ToNullString() == "1") { if (orderInfo.PreSaleId > 0 && orderInfo.DepositDate.HasValue) { this.promptMsg.InnerHtml = "定金支付成功,请按时支付尾款。"; ProductPreSaleInfo productPreSaleInfo = ProductPreSaleHelper.GetProductPreSaleInfo(orderInfo.PreSaleId); if (productPreSaleInfo.PaymentStartDate > DateTime.Now) { HtmlGenericControl htmlGenericControl = this.promptMsg; string[] obj = new string[5] { "定金支付成功,请您在", null, null, null, null }; dateTime = productPreSaleInfo.PaymentStartDate; obj[1] = dateTime.ToString("yyyy-MM-dd"); obj[2] = "至"; dateTime = productPreSaleInfo.PreSaleEndDate; obj[3] = dateTime.ToString("yyyy-MM-dd"); obj[4] = "之间支付尾款,过期定金将不予以退还,请您谅解!"; htmlGenericControl.InnerHtml = string.Concat(obj); this.onlinePayPanel.Visible = false; } } else { this.promptMsg.InnerHtml = "银行系统可能会出现延时,如您已经支付,请耐心等待或者联系商家客服!"; } } else if (orderInfo.PreSaleId > 0) { if (orderInfo.DepositDate.HasValue) { this.promptMsg.InnerHtml = "定金支付成功,请按时支付尾款。"; ProductPreSaleInfo productPreSaleInfo2 = ProductPreSaleHelper.GetProductPreSaleInfo(orderInfo.PreSaleId); if (productPreSaleInfo2.PaymentStartDate > DateTime.Now) { HtmlGenericControl htmlGenericControl2 = this.promptMsg; string[] obj2 = new string[5] { "定金支付成功,请您在", null, null, null, null }; dateTime = productPreSaleInfo2.PaymentStartDate; obj2[1] = dateTime.ToString("yyyy-MM-dd"); obj2[2] = "至"; dateTime = productPreSaleInfo2.PaymentStartDate; obj2[3] = dateTime.ToString("yyyy-MM-dd"); obj2[4] = "之间支付尾款,过期定金将不予以退还,请您谅解!"; htmlGenericControl2.InnerHtml = string.Concat(obj2); this.onlinePayPanel.Visible = false; } } else { this.promptMsg.InnerHtml = "请您在订单提交后 <em>" + text + "</em>内完成定金支付,否则订单自动取消。"; } } else { this.promptMsg.InnerHtml = "请您在订单提交后 <em>" + text + "</em>内完成支付,否则订单自动取消。"; } } else if (flag) { this.promptMsg.InnerHtml = "您的订单选择了货到付款,平台将及时给您发货。"; } else if (orderInfo.PaymentTypeId == -3) { this.promptMsg.InnerHtml = "您的订单选择了上门自提,门店正在备货中。"; } if (this.onlinePayPanel.Visible) { DataTable dataTable = new DataTable(); dataTable.Columns.Add(new DataColumn("ModeId")); dataTable.Columns.Add(new DataColumn("Name")); dataTable.Columns.Add(new DataColumn("GateWay")); dataTable.Columns.Add(new DataColumn("Description")); dataTable.Columns.Add(new DataColumn("OutHtml")); IList <PaymentModeInfo> paymentModes = ShoppingProcessor.GetPaymentModes(PayApplicationType.payOnPC); paymentModes = (from item in paymentModes where !paymentTypes.Contains(item.Gateway) select item).ToList(); if (HiContext.Current.UserId != 0 && HiContext.Current.User.IsOpenBalance) { PaymentModeInfo paymentMode3 = ShoppingProcessor.GetPaymentMode("hishop.plugins.payment.advancerequest"); if (paymentMode3 != null) { this.AdvanceId.Value = paymentMode3.ModeId.ToString(); paymentModes.Add(paymentMode3); } } if (paymentModes.Count == 0) { this.ShowMessage("商城暂未配置支付方式,请稍后支付。", false, "", 1); this.onlinePayPanel.Visible = false; } else { decimal num2 = default(decimal); if (HiContext.Current.User != null && HiContext.Current.User.UserId > 0) { num2 = HiContext.Current.User.Balance - HiContext.Current.User.RequestBalance; } string format = "<a class=\"pic\"><b><img src=\"/pay/images/{0}.png\" alt=\"{1}\"></b> <span>{1}</span></a>"; string text2 = "<a class=\"name\"><em>{0}</em> <b>可用余额 ¥{1}</b> <span><a href=\"/user/RechargeRequest.aspx\" target=\"_blank\" style=\"line-height:4.5\">去充值</a></span></a>"; string format2 = "<a class=\"name\"><em>{0}</em></a>"; int num3 = 0; foreach (PaymentModeInfo item in paymentModes) { if (!(item.Gateway.ToLower() == "hishop.plugins.payment.advancerequest") && (orderInfo.FightGroupActivityId <= 0 || TradeHelper.GatewayIsCanBackReturn(item.Gateway) || !(item.Gateway.ToLower() != "hishop.plugins.payment.advancerequest"))) { DataRow dataRow = dataTable.NewRow(); dataRow["ModeId"] = item.ModeId; dataRow["Name"] = item.Name; dataRow["Gateway"] = item.Gateway; dataRow["Description"] = item.Description; if (!(item.Gateway.ToLower() == "hishop.plugins.payment.advancerequest")) { if (File.Exists(this.Page.Server.MapPath("/pay/images/" + item.Gateway + ".png"))) { dataRow["OutHtml"] = string.Format(format, item.Gateway, item.Name); } else { dataRow["OutHtml"] = string.Format(format2, item.Name); } dataTable.Rows.Add(dataRow); num3++; } } } this.paymentModeList.DataSource = dataTable; this.paymentModeList.DataBind(); } } }