protected void Page_Load(object sender, EventArgs e)
    {
        int siteID = appxCMS.Util.CMSSettings.GetSiteId();

        //Addtional Site data.  Build SiteDetails Obj
        SiteUtility.SiteDetails siteDetails = new SiteUtility.SiteDetails();
        siteDetails = SiteUtility.RetrieveSiteSettings(siteID);


        if (siteDetails.AllowListProducts)
        {
            phSavedLists.Visible = true;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        int siteID = appxCMS.Util.CMSSettings.GetSiteId();

        SiteUtility.SiteDetails siteDetails = new SiteUtility.SiteDetails();
        siteDetails = SiteUtility.RetrieveSiteSettings(siteID);

        if (siteDetails.HideTaradelContent)
        {
            phNoTaradelDesignerMessage.Visible = true;
        }
        else
        {
            phGeneralDesignerMessage.Visible = true;
        }
    }
    //===============================================================================================================
    //  NOTES:
    //  Logo image must exist in the white label cmsimages folder and be named 'quote-header-logo.png'
    //
    //  If site has a CoBrand logo (ex: FedEx) then the file name must be in the pnd_SiteStringResourceMgr tbl and the file must be 
    //  located in the cmsimages folder structure.
    //===============================================================================================================
    protected void Page_Load(object sender, EventArgs e)
    {

        int siteID = appxCMS.Util.CMSSettings.GetSiteId();
        imgLogo.ImageUrl = "/cmsimages/" + siteID + "/quote-header-logo.png";


        SiteUtility.SiteDetails siteDetails = new SiteUtility.SiteDetails();
        siteDetails = SiteUtility.RetrieveSiteSettings(siteID);


        if (siteDetails.UseCoBrandLogo)
        {
            if (!String.IsNullOrEmpty(SiteUtility.GetStringResourceValue(siteID, "CoBrandHeaderLogo")))
            { imgCoBrandLogo.ImageUrl = "/cmsimages/" + siteID + "/" + SiteUtility.GetStringResourceValue(siteID, "CoBrandHeaderLogo"); }
        }

        else
        { imgCoBrandLogo.Visible = false; }



    }
    protected void Page_Load(object sender, EventArgs e)
    {
        int    siteID      = appxCMS.Util.CMSSettings.GetSiteId();
        string fileName    = "";
        string fileContent = "";
        string appRoot     = Server.MapPath("~/");

        //Create siteObj
        SiteUtility.SiteDetails siteDetails = new SiteUtility.SiteDetails();
        siteDetails = SiteUtility.RetrieveSiteSettings(siteID);

        //If Google Analytics script is needed...
        if (siteDetails.UseGoogleAnalytics)
        {
            switch (siteID)
            {
            //EDDM
            case 1:
                fileName = "GoogleAnalytics-EDDM.txt";
                break;


            //FedEx
            case 41:
                fileName = "GoogleAnalytics-FedEx.txt";
                break;


            //Staples Act Mgr
            case 78:
                fileName = "GoogleAnalytics-StaplesActMgr.txt";
                break;


            //RAMP
            case 80:
                fileName = "GoogleAnalytics-RAMP.txt";
                break;


            //FedEx LIST DEMO
            case 84:
                fileName = "GoogleAnalytics-FedEx.txt";
                break;


            //Staples Store
            case 91:
                fileName = "GoogleAnalytics-StaplesStore.txt";
                break;


            //Staples Consumer
            case 93:
                fileName = "GoogleAnalytics-StaplesConsumer.txt";
                break;


            //RAMP Express
            case 98:
                fileName = "GoogleAnalytics-RAMPExpress.txt";
                break;


            //Taradel DM
            case 100:
                fileName = "GoogleAnalytics-TaradelDM.txt";
                break;

            default:
                break;
            }

            if (!String.IsNullOrEmpty(fileName))
            {
                if (File.Exists(appRoot + "\\assets\\scripts\\" + fileName))
                {
                    phGoogleAnalyticsScript.Visible = true;
                    fileContent = File.ReadAllText(appRoot + "\\assets\\scripts\\" + fileName);
                    litGoogleAnalyticsScript.Text = fileContent;
                }
            }
        }
    }
    //Methods
    protected void Page_Load(object sender, EventArgs e)
    {
        //get SiteDetails
        SiteUtility.SiteDetails siteDetails = new SiteUtility.SiteDetails();
        siteDetails = SiteUtility.RetrieveSiteSettings(siteID);


        //Look for cookie w/ Distribution which will help reset filters.
        int prevDistributionID = CheckForCookie();

        if (prevDistributionID > 0)
        {
            //Dist created within current visit.  Reset filters to match.
            PreselectFilters(prevDistributionID);
        }



        if (!(Page.IsPostBack))
        {
            //wire up controls
            ddlRadiusValue.Attributes.Add("onchange", "RadiusValueChanged();");
            ddlRadiusType.Attributes.Add("onchange", "RadiusTypeChanged();");
            txtAddress.Attributes.Add("onchange", "AddressChanged();");
            txtZipCode.Attributes.Add("onchange", "ZipCodeChanged();");
            txtZipCodesList.Attributes.Add("onchange", "ZipCodesListChanged();");
            txtListName.Attributes.Add("placeholder", "name this list");
            radAddress.Attributes.Add("onchange", "TargetAreaTypeChanged();");
            radZipCodes.Attributes.Add("onchange", "TargetAreaTypeChanged();");


            //Order Steps
            OrderSteps.numberOfSteps = 5;
            OrderSteps.step1Text     = "1) Define Area";
            OrderSteps.step1Url      = "/Addressed/Step1-BuildYourList.aspx";
            OrderSteps.step1State    = "current";
            OrderSteps.step1Icon     = "fa-map-marker";

            OrderSteps.step2Text  = "2) Define Customers";
            OrderSteps.step2Url   = "/Addressed/Step1-BuildYourList.aspx";
            OrderSteps.step2State = "";
            OrderSteps.step2Icon  = "fa-user";

            OrderSteps.step3Text  = "3) Choose Product";
            OrderSteps.step3Url   = "";
            OrderSteps.step3State = "";
            OrderSteps.step3Icon  = "fa-folder";

            OrderSteps.step4Text  = "4) Define Delivery";
            OrderSteps.step4Url   = "";
            OrderSteps.step4State = "";
            OrderSteps.step4Icon  = "fa-envelope";

            OrderSteps.step5Text  = "5) Check Out";
            OrderSteps.step5Url   = "";
            OrderSteps.step5State = "";
            OrderSteps.step5Icon  = "fa-credit-card";


            //SitePhoneNumber
            SitePhoneNumber.addCallUs     = "true";
            SitePhoneNumber.useIcon       = "true";
            SitePhoneNumber.makeHyperLink = "true";



            //Page Header
            if (!siteDetails.UseRibbonBanners)
            {
                PageHeader.headerType   = "simple";
                PageHeader.simpleHeader = "Build Your List";
            }

            else
            {
                PageHeader.headerType = "partial";
                PageHeader.mainHeader = "Build Your List";
                PageHeader.subHeader  = "Start Here";
            }



            //Preload "List Name".
            txtListName.Text = "Addressed List " + DateTime.Today.ToShortDateString();


            hypEmail.Text        = "<span class=" + Convert.ToChar(34) + "fa fa-envelope" + Convert.ToChar(34) + "></span>&nbsp;" + siteDetails.SupportEmail;
            hypEmail.NavigateUrl = "mailto:" + siteDetails.SupportEmail;
        }


        if (siteDetails.TestMode)
        {
            ShowDebug();
            txtAddress.Text = "4805 Lake Brooke Drive";
            txtZipCode.Text = "2306";
        }

        else
        {
            if (!String.IsNullOrEmpty(Request.QueryString["debug"]))
            {
                if (Request.QueryString["debug"] == "hodor")
                {
                    ShowDebug();
                }
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        int    siteID      = appxCMS.Util.CMSSettings.GetSiteId();
        string fileName    = "";
        string fileContent = "";
        string appRoot     = Server.MapPath("~/");

        //Create siteObj
        SiteUtility.SiteDetails siteDetails = new SiteUtility.SiteDetails();
        siteDetails = SiteUtility.RetrieveSiteSettings(siteID);

        //If BoldChatVM Script is needed...
        if (siteDetails.UseBoldChatVMScript)
        {
            switch (siteID)
            {
            //EDDM
            case 1:
                fileName = "BoldChatVMScript-EDDM.txt";
                break;


            //OLB
            case 11:
                fileName = "BoldChatVMScript-OLB.txt";
                break;


            //Rooterman
            case 18:
                fileName = "BoldChatVMScript-Rooterman.txt";
                break;


            //FedEx
            case 41:
                fileName = "BoldChatVMScript-FedEx.txt";
                break;


            //The Flyer
            case 57:
                fileName = "BoldChatVMScript-TheFlyer.txt";
                break;


            //CHHJ
            case 60:
                fileName = "BoldChatVMScript-CHHJ.txt";
                break;


            //CoBrand
            case 77:
                fileName = "BoldChatVMScript-CoBrand.txt";
                break;


            //Staples Act Mgr
            case 78:
                fileName = "BoldChatVMScript-StaplesActMgr.txt";
                break;


            ////FedEx LIST DEMO
            //case 84:
            //    fileName = "BoldChatVMScript-FedEx.txt";
            //    break;


            //Progressive
            case 90:
                fileName = "BoldChatVMScript-Progressive.txt";
                break;


            //Staples Store
            case 91:
                fileName = "BoldChatVMScript-StaplesStore.txt";
                break;


            //Staples Consumer
            case 93:
                fileName = "BoldChatVMScript-StaplesConsumer.txt";
                break;


            //Progressive Platinum
            case 94:
                fileName = "BoldChatVMScript-ProgressivePlat.txt";
                break;

            //Taradel DM
            case 100:
                fileName = "BoldChatVMScript-EDDM.txt";
                break;

            default:
                break;
            }

            if (!String.IsNullOrEmpty(fileName))
            {
                if (File.Exists(appRoot + "\\assets\\scripts\\" + fileName))
                {
                    phBoldChatVMScript.Visible = true;
                    fileContent = File.ReadAllText(appRoot + "\\assets\\scripts\\" + fileName);
                    litBoldChatVMScript.Text = fileContent;
                }
            }
        }
    }
Exemple #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int    siteID      = appxCMS.Util.CMSSettings.GetSiteId();
        string phoneNumber = "";

        //Addtional Site data.  This will be used to determine if we show chat and/or if we show FAQ/Support link.
        SiteUtility.SiteDetails siteDetails = new SiteUtility.SiteDetails();
        siteDetails = SiteUtility.RetrieveSiteSettings(siteID);


        //Create appX oSite obj to get phone number for site.
        appxCMS.Site oSite = appxCMS.SiteDataSource.GetSite(siteID);


        if (oSite != null)
        {
            if (!String.IsNullOrEmpty(oSite.TollFreeNumber))
            {
                phoneNumber = ReformatPhoneNumber(oSite.TollFreeNumber);
            }
            else if (!String.IsNullOrEmpty(oSite.PhoneNumber))
            {
                phoneNumber = ReformatPhoneNumber(oSite.PhoneNumber);
            }
            else
            {
                phoneNumber = "unknown";
            }
        }


        //Set phone number labels
        litPhone.Text  = phoneNumber;
        litPhone2.Text = phoneNumber;
        litPhone3.Text = phoneNumber;


        //if Chat not allowed, remove it
        if (siteDetails.ShowChat)
        {
            //show everything
            if (siteDetails.ShowFaq)
            {
                pnlWithChat.Visible = true;
            }
        }

        //hide chat option
        else
        {
            //don't show chat or FAQ links
            if (!siteDetails.ShowFaq)
            {
                pnlWithoutChatFaq.Visible = true;
            }

            //show FAQs but not chat
            else
            {
                pnlWithoutChat.Visible = true;
            }
        }


        //slight hack. If other sites require this then make it configurable.
        //Staples Act Mgr
        if (siteID == 95)
        {
            litSupport.Text        = "Support/FAQs";
            hypSupport.Text        = "See FAQs Here";
            hypSupport.NavigateUrl = "/FAQ";
        }

        else
        {
            litSupport.Text        = "Support";
            hypSupport.Text        = "Get Answers Here";
            hypSupport.NavigateUrl = "/Support";
        }
    }