protected override void AttachChildControls() { this.txtSKU = (TextBox)this.FindControl("txtSKU"); this.btnSKU = (Button)this.FindControl("btnSKU"); this.shoppingCartProductList = (Common_ShoppingCart_ProductList)this.FindControl("Common_ShoppingCart_ProductList"); this.shoppingCartGiftList = (Common_ShoppingCart_GiftList)this.FindControl("Common_ShoppingCart_GiftList"); this.shoppingCartStoreList = (Common_ShoppingCart_StoreList)this.FindControl("Common_ShoppingCart_StoreList"); this.lblTotalPrice = (FormatedMoneyLabel)this.FindControl("lblTotalPrice"); this.btnCheckout = (Button)this.FindControl("btnCheckout"); this.btnUnCheckout = (HtmlInputButton)this.FindControl("btnUnCheckout"); this.pnlShopCart = (Panel)this.FindControl("pnlShopCart"); this.pnlPromoGift = (Panel)this.FindControl("pnlPromoGift"); this.pnlNoProduct = (Panel)this.FindControl("pnlNoProduct"); this.hfdIsLogin = (HiddenField)this.FindControl("hfdIsLogin"); this.hidCurrentPoints = (HiddenField)this.FindControl("hidCurrentPoints"); this.btnSKU.Click += this.btnSKU_Click; this.shoppingCartProductList.ItemDataBound += this.shoppingCartProductList_ItemDataBound; this.hidPointGifts = (HtmlInputHidden)this.FindControl("hidPointGifts"); this.shoppingCartGiftList.ItemCommand += this.shoppingCartGiftList_ItemCommand; this.btnCheckout.Click += this.btnCheckout_Click; this.BindShoppingCart(); if (HiContext.Current.UserId != 0) { this.hfdIsLogin.Value = "logined"; this.hidCurrentPoints.Value = HiContext.Current.User.Points.ToString(); } }
protected override void AttachChildControls() { this.txtSKU = (System.Web.UI.WebControls.TextBox) this.FindControl("txtSKU"); this.btnSKU = (System.Web.UI.WebControls.Button) this.FindControl("btnSKU"); this.btnClearCart = (ImageLinkButton)this.FindControl("btnClearCart"); this.shoppingCartProductList = (Common_ShoppingCart_ProductList)this.FindControl("Common_ShoppingCart_ProductList"); this.shoppingCartGiftList = (Common_ShoppingCart_GiftList)this.FindControl("Common_ShoppingCart_GiftList"); this.shoppingCartPromoGiftList = (Common_ShoppingCart_PromoGiftList)this.FindControl("Common_ShoppingCart_PromoGiftList"); this.lblTotalPrice = (FormatedMoneyLabel)this.FindControl("lblTotalPrice"); this.lblAmoutPrice = (System.Web.UI.WebControls.Literal) this.FindControl("lblAmoutPrice"); this.lblTax = (System.Web.UI.WebControls.Literal) this.FindControl("lblTax"); this.lblReducedActivity = (System.Web.UI.WebControls.Literal) this.FindControl("lblReducedActivity"); this.hlkReducedPromotion = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlkReducedPromotion"); this.btnCheckout = (System.Web.UI.WebControls.Button) this.FindControl("btnCheckout"); this.pnlShopCart = (System.Web.UI.WebControls.Panel) this.FindControl("pnlShopCart"); this.pnlPromoGift = (System.Web.UI.WebControls.Panel) this.FindControl("pnlPromoGift"); this.pnlNoProduct = (System.Web.UI.WebControls.Panel) this.FindControl("pnlNoProduct"); this.hfdIsLogin = (System.Web.UI.WebControls.HiddenField) this.FindControl("hfdIsLogin"); this.btnSKU.Click += new System.EventHandler(this.btnSKU_Click); this.btnClearCart.Click += new System.EventHandler(this.btnClearCart_Click); this.shoppingCartProductList.ItemCommand += new System.Web.UI.WebControls.DataListCommandEventHandler(this.shoppingCartProductList_ItemCommand); this.shoppingCartProductList.ItemDataBound += shoppingCartProductList_ItemDataBound; this.shoppingCartGiftList.ItemCommand += new System.Web.UI.WebControls.DataListCommandEventHandler(this.shoppingCartGiftList_ItemCommand); this.shoppingCartGiftList.FreeItemCommand += new System.Web.UI.WebControls.DataListCommandEventHandler(this.shoppingCartGiftList_FreeItemCommand); this.shoppingCartPromoGiftList.ItemCommand += new System.Web.UI.WebControls.RepeaterCommandEventHandler(this.shoppingCartPromoGiftList_ItemCommand); this.btnCheckout.Click += new System.EventHandler(this.btnCheckout_Click); shoppingCart = ShoppingCartProcessor.GetShoppingCart(); if (!HiContext.Current.SiteSettings.IsOpenSiteSale) { this.btnSKU.Visible = false; this.btnCheckout.Visible = false; } if (!HiContext.Current.User.IsAnonymous) { this.hfdIsLogin.Value = "logined"; } System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start(); this.BindShoppingCart(); sw.Stop(); ErrorLog.Write("PC端购物车加载所用的时间(毫秒):" + sw.ElapsedMilliseconds.ToString()); }
protected override void AttachChildControls() { this.txtSKU = (System.Web.UI.WebControls.TextBox) this.FindControl("txtSKU"); this.btnSKU = (System.Web.UI.WebControls.Button) this.FindControl("btnSKU"); this.btnClearCart = (ImageLinkButton)this.FindControl("btnClearCart"); this.shoppingCartProductList = (Common_ShoppingCart_ProductList)this.FindControl("Common_ShoppingCart_ProductList"); this.shoppingCartGiftList = (Common_ShoppingCart_GiftList)this.FindControl("Common_ShoppingCart_GiftList"); this.shoppingCartPromoGiftList = (Common_ShoppingCart_PromoGiftList)this.FindControl("Common_ShoppingCart_PromoGiftList"); this.lblTotalPrice = (FormatedMoneyLabel)this.FindControl("lblTotalPrice"); this.lblAmoutPrice = (System.Web.UI.WebControls.Literal) this.FindControl("lblAmoutPrice"); this.hlkReducedPromotion = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlkReducedPromotion"); this.btnCheckout = (System.Web.UI.WebControls.Button) this.FindControl("btnCheckout"); this.pnlShopCart = (System.Web.UI.WebControls.Panel) this.FindControl("pnlShopCart"); this.pnlPromoGift = (System.Web.UI.WebControls.Panel) this.FindControl("pnlPromoGift"); this.litNoProduct = (System.Web.UI.WebControls.Literal) this.FindControl("litNoProduct"); this.hfdIsLogin = (System.Web.UI.WebControls.HiddenField) this.FindControl("hfdIsLogin"); this.btnSKU.Click += new System.EventHandler(this.btnSKU_Click); this.btnClearCart.Click += new System.EventHandler(this.btnClearCart_Click); this.shoppingCartProductList.ItemCommand += new System.Web.UI.WebControls.DataListCommandEventHandler(this.shoppingCartProductList_ItemCommand); this.shoppingCartGiftList.ItemCommand += new System.Web.UI.WebControls.DataListCommandEventHandler(this.shoppingCartGiftList_ItemCommand); this.shoppingCartGiftList.FreeItemCommand += new System.Web.UI.WebControls.DataListCommandEventHandler(this.shoppingCartGiftList_FreeItemCommand); this.shoppingCartPromoGiftList.ItemCommand += new System.Web.UI.WebControls.RepeaterCommandEventHandler(this.shoppingCartPromoGiftList_ItemCommand); this.btnCheckout.Click += new System.EventHandler(this.btnCheckout_Click); if (!Hidistro.Membership.Context.HiContext.Current.SiteSettings.IsOpenSiteSale && !Hidistro.Membership.Context.HiContext.Current.SiteSettings.IsDistributorSettings) { this.btnSKU.Visible = false; this.btnCheckout.Visible = false; } if (!this.Page.IsPostBack) { this.BindShoppingCart(); } if (!Hidistro.Membership.Context.HiContext.Current.User.IsAnonymous) { this.hfdIsLogin.Value = "logined"; } }
protected override void AttachChildControls() { this.txtSKU = (TextBox)this.FindControl("txtSKU"); this.btnSKU = (Button)this.FindControl("btnSKU"); this.btnClearCart = (ImageLinkButton)this.FindControl("btnClearCart"); this.shoppingCartProductList = (Common_ShoppingCart_ProductList)this.FindControl("Common_ShoppingCart_ProductList"); this.shoppingCartGiftList = (Common_ShoppingCart_GiftList)this.FindControl("Common_ShoppingCart_GiftList"); this.lblTotalPrice = (FormatedMoneyLabel)this.FindControl("lblTotalPrice"); this.lblAmoutPrice = (FormatedMoneyLabel)this.FindControl("lblAmoutPrice"); this.litlDiscountPrice = (Literal)this.FindControl("litlDiscountPrice"); this.hlkDiscountName = (HyperLink)this.FindControl("hlkDiscountName"); this.btnCheckout = (Button)this.FindControl("btnCheckout"); this.btnShopping = (Button)this.FindControl("btnShopping"); this.pnlShopCart = (Panel)this.FindControl("pnlShopCart"); this.litNoProduct = (Literal)this.FindControl("litNoProduct"); this.hfdIsLogin = (HiddenField)this.FindControl("hfdIsLogin"); this.btnSKU.Click += new EventHandler(this.btnSKU_Click); this.btnClearCart.Click += new EventHandler(this.btnClearCart_Click); this.shoppingCartProductList.ItemCommand += new DataListCommandEventHandler(this.shoppingCartProductList_ItemCommand); this.shoppingCartGiftList.ItemCommand += new DataListCommandEventHandler(this.shoppingCartGiftList_ItemCommand); this.btnCheckout.Click += new EventHandler(this.btnCheckout_Click); this.btnShopping.Click += new EventHandler(this.btnShopping_Click); if (!HiContext.Current.SiteSettings.IsOpenSiteSale && !HiContext.Current.SiteSettings.IsDistributorSettings) { this.btnSKU.Visible = false; this.btnCheckout.Visible = false; this.btnShopping.Visible = false; } if (!this.Page.IsPostBack) { this.BindShoppingCart(); } if (!HiContext.Current.User.IsAnonymous) { this.hfdIsLogin.Value = "logined"; } }