protected override void AttachChildControls() { this.inputPaymentModeId = (HtmlInputHidden)this.FindControl("inputPaymentModeId"); this.inputShippingModeId = (HtmlInputHidden)this.FindControl("inputShippingModeId"); this.hidPaymentId_Podrequest = (HtmlInputHidden)this.FindControl("hidPaymentId_Podrequest"); this.hidPaymentId_Offline = (HtmlInputHidden)this.FindControl("hidPaymentId_Offline"); this.hidGetgoodsOnStores = (HtmlInputHidden)this.FindControl("hidGetgoodsOnStores"); this.hidHasStoresInCity = (HtmlInputHidden)this.FindControl("hidHasStoresInCity"); this.hidDeliveryTime = (HtmlInputHidden)this.FindControl("hidDeliveryTime"); this.hidStoreId = (HtmlInputHidden)this.FindControl("hidStoreId"); this.hidShipAddressId = (HtmlInputHidden)this.FindControl("hidShipAddressId"); this.litStoreName = (Literal)this.FindControl("litStoreName"); this.litAddress = (Literal)this.FindControl("litAddress"); this.litTel = (Literal)this.FindControl("litTel"); this.hidOnlinePayCount = (HtmlInputHidden)this.FindControl("hidOnlinePayCount"); this.hidHasSupplierProduct = (HtmlInputHidden)this.FindControl("hidHasSupplierProduct"); if (!this.Page.IsPostBack) { this.hidHasSupplierProduct.Value = this.hasSupplierProduct.ToString(); this.hidOnlinePayCount.Value = TradeHelper.WapPaymentTypeCount(base.ClientType, this.isFightGroup).ToNullString(); this.hidGetgoodsOnStores.Value = "false"; this.hidHasStoresInCity.Value = "false"; this.hidPaymentId_Podrequest.Value = "0"; int num = 0; int num2 = 0; if (this.from != "countdown" && this.from != "groupbuy" && this.hasSupplierProduct != 1) { if (this.from != "presale" && SalesHelper.IsSupportPodrequest()) { num = 1; this.hidPaymentId_Podrequest.Value = "1"; } if (ShoppingProcessor.IsSupportOfflineRequest()) { this.hidPaymentId_Offline.Value = "2"; num2 = 2; } } if (this.paymentModeId != 0 && this.paymentModeId != num && this.paymentModeId != num2 && this.paymentModeId != -3) { this.paymentModeId = 0; } this.hidDeliveryTime.Value = this.deliveryTime; if (this.paymentModeId == 0) { if (TradeHelper.WapPaymentTypeCount(base.ClientType, this.isFightGroup) > 0) { this.inputPaymentModeId.Value = this.paymentModeId.ToString(); } } else { this.inputPaymentModeId.Value = this.paymentModeId.ToString(); } this.inputShippingModeId.Value = this.shippingModeId.ToString(); int shipAddressId = 0; int.TryParse(this.Page.Request.QueryString["ShipAddressId"].ToNullString(), out shipAddressId); IList <ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses(false); int regionId = 0; IList <ShippingAddressInfo> list = new List <ShippingAddressInfo>(); ShippingAddressInfo shippingAddressInfo = null; if (shipAddressId > 0) { shippingAddressInfo = shippingAddresses.FirstOrDefault((ShippingAddressInfo a) => a.ShippingId == shipAddressId); if (shippingAddressInfo != null) { regionId = shippingAddressInfo.RegionId; } } else if (shippingAddresses != null && shippingAddresses.Count > 0) { regionId = shippingAddresses.FirstOrDefault().RegionId; } this.hidShipAddressId.Value = shipAddressId.ToString(); SiteSettings masterSettings = SettingsManager.GetMasterSettings(); if (masterSettings.OpenMultStore) { this.hidStoreId.Value = this.storeId.ToString(); if (this.storeId > 0) { StoresInfo storeById = DepotHelper.GetStoreById(this.storeId); this.litStoreName.Text = (string.IsNullOrEmpty(storeById.StoreOpenTime) ? storeById.StoreName : (storeById.StoreName + " [营业时间:" + storeById.StoreOpenTime + "]")); this.litAddress.Text = RegionHelper.GetFullRegion(storeById.RegionId, string.Empty, true, 0) + storeById.Address; this.litTel.Text = storeById.Tel; } if (this.from != "countdown" && this.from != "groupbuy" && this.from != "presale" && this.shoppingCart.LineItems.Count > 0) { string str = this.productSku.Replace(",", "','"); str = "'" + str + "'"; if (ShoppingCartProcessor.CanGetGoodsOnStore(str)) { this.hidGetgoodsOnStores.Value = "true"; bool flag = StoresHelper.HasStoresInCity(str, regionId); this.hidHasStoresInCity.Value = (flag ? "true" : "false"); } } else { this.hidGetgoodsOnStores.Value = "false"; } } } }