Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ScriptManager scrptMgr = Page.Master.FindControl <ScriptManager>("scrptMgr");

            scrptMgr.Scripts.Add(new ScriptReference("~/jscripts/product.js"));

            if (AppLogic.AppConfigBool("Minicart.UseAjaxAddToCart"))
            {
                scrptMgr.Services.Add(new ServiceReference("~/actionservice.asmx"));
            }


            m_EP = new ShowEntityPage(EntityDefinitions.readonly_GenreEntitySpecs, this);
            m_EP.Page_Load(sender, e);

            PayPalAd entityPageAd = new PayPalAd(PayPalAd.TargetPage.Entity);

            if (entityPageAd.Show)
            {
                ltPayPalAd.Text = entityPageAd.ImageScript;
            }

            litOutput.Text = m_EP.GetOutput();

            // check if the postback was caused by an addtocart button
            if (this.IsPostBack && m_EP.IsAddToCartPostBack)
            {
                HandleAddToCart();
                return;
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            m_EP = new ShowEntityPage(EntityDefinitions.readonly_CategoryEntitySpecs, this);
            m_EP.Page_Load(sender, e);

            PayPalAd entityPageAd = new PayPalAd(PayPalAd.TargetPage.Entity);

            ((System.Web.UI.WebControls.Label)Master.FindControl("lblPageHeading")).Text = SEDescription;

            string parentCategoryName = string.Empty;
            string parentCategoryID   = string.Empty;

            GetParentCategory(ref parentCategoryName, ref parentCategoryID);

            if (!string.IsNullOrEmpty(parentCategoryName))
            {
                ((System.Web.UI.WebControls.HyperLink)Master.FindControl("lnkCategory")).Text        = parentCategoryName;
                ((System.Web.UI.WebControls.HyperLink)Master.FindControl("lnkCategory")).NavigateUrl = "~/c-" + parentCategoryID + "-" + parentCategoryName.Replace(" ", "-") + ".aspx";

                ((System.Web.UI.WebControls.Label)Master.FindControl("lblSperator")).Text = ">>";

                ((System.Web.UI.WebControls.HyperLink)Master.FindControl("lnkSubCategory")).Text = SEDescription;
                ((System.Web.UI.WebControls.HyperLink)Master.FindControl("lnkSubCategory")).Style.Add("text-decoration", "none");

                ((System.Web.UI.WebControls.Label)Master.FindControl("lblPageHeading")).Visible = false;
            }
            if (entityPageAd.Show)
            {
                ltPayPalAd.Text = entityPageAd.ImageScript;
            }

            litOutput.Text = m_EP.GetOutput();

            CategoryTypeFlag = litOutput.Text.Contains("entity.guidednavigationgrid.xml.config") ? "true" : "false";

            // check if the postback was caused by an addtocart button
            if (IsPostBack && m_EP.IsAddToCartPostBack)
            {
                HandleAddToCart();
                return;
            }
        }