Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MainLogin.DestinationPageUrl = this.Destination;
            if (!Page.IsPostBack)
            {
                //Uri u = Request.Url;
                //String[] uSegs = u.Segments.TakeWhile(seg => seg != u.Segments.Last()).ToArray();

                //((HyperLink)MainLogin.FindControl("hlReset")).NavigateUrl = ResolveUrl("ResetPassword.aspx");

                if (ClientUrl != null && ClientUrl != String.Empty)
                {
                    lbtnRegister.Visible = true;
                }

                WorkWithSignInTextBoxes();

                if (IsTimeout)
                {
                    Literal lFail = (Literal)MainLogin.FindControl("FailureText");
                    lFail.Text = "<div style=\"text-align:left;color:red;\">For your security we logged you out after being idle for 15 minutes.<br /><b style=\"color:red;\">Please sign in again.</b></div>";
                    FormsAuthentication.SignOut();
                    ThisSession.ClearSessionVariables();
                }
                else if (!System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
                {
                    ThisSession.ClearSessionVariables();
                }
            }
            else
            {
            }
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Page.AddCSSToHeader("SearchMaster.css");
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.Cache.SetNoStore();
            Response.Cache.SetNoServerCaching();

            internalLogo.Visible = ThisSession.InternalLogo;
            if (ThisSession.InternalLogo)
            {
                internalLogo.ImageUrl = ResolveUrl(String.Concat("~/Images/", ThisSession.LogoImageName));
            }
            amSearchMaster.ContactText = ThisSession.ContactText;

            ltlAboutUs.Text = String.Format("<a href=\"{0}\">About Us</a>",
                                            ResolveUrl(String.Format("../{0}/AboutUs.aspx",
                                                                     ThisSession.EmployerName)
                                                       )
                                            );
            ltlContactUs.Text = String.Format("<a href=\"{0}\">Contact Us</a>",
                                              ResolveUrl(String.Format("../{0}/Contact_Us.aspx",
                                                                       ThisSession.EmployerName)
                                                         )
                                              );
            ltlFAQ.Text = String.Format("<a href=\"{0}\">FAQs</a>",
                                        ResolveUrl(String.Format("../{0}/FAQ.aspx",
                                                                 ThisSession.EmployerName)
                                                   )
                                        );
            if (!Page.IsPostBack)
            {
                lblEmployeeName.Text = ThisSession.FirstName.ToUpper() + " " + ThisSession.LastName.ToUpper();

                //The LargerMap page also uses the Search Master template but we don't want to clear all session vars there so only do it if we're on the search page
                if (!Request.Url.PathAndQuery.ToLower().Contains("largermap"))
                {
                    ThisSession.ClearSearchSessionVariables();
                }
            }

            prepUI();

            //if (!Page.ClientScript.IsClientScriptIncludeRegistered("Timeout"))
            //{
            //    if (Request.Url.Host.ToLower().Contains("localhost"))
            //        Page.ClientScript.RegisterClientScriptInclude("Timeout", ResolveUrl("~/Scripts/Timeout.js?Rev=") + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString());
            //    else
            //        Page.ClientScript.RegisterClientScriptInclude("Timeout", ResolveUrl("~/Scripts/Timeout.min.js?Rev=") + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString());
            //}

            //String startScript = ("$('body').TimeoutTimer({ TimeTilTimeout: {0}, TimeTilNotify: 120, NavUrl: '{1}' });").Replace("{0}", (Session.Timeout * 60).ToString()).Replace("{1}", ResolveUrl("~/Sign_in.aspx"));
            //Page.ClientScript.RegisterStartupScript(this.GetType(), "SetTimeout", startScript, true);
        }
Exemple #3
0
        protected void MakeVisible(ThisSession.AvailableTab at)
        {
            //Setup our default settings for the new CSS Classes the control will receive
            String inactiveTab = "ui-state-default ui-corner-all",
                activeTab = "ui-state-default ui-corner-top ui-tabs-selected ui-state-active";

            //Make visible the panel we need and add the active class to only to the tab we want
            switch (at)
            {
                case ThisSession.AvailableTab.SavingsChoiceDashboard:
                    ThisSession.SelectedTab = ThisSession.AvailableTab.SavingsChoiceDashboard;
                    liSavingsChoice.Attributes["class"] = activeTab;
                    break;
                case ThisSession.AvailableTab.FindAService:
                    ThisSession.SelectedTab = ThisSession.AvailableTab.FindAService;
                    liFindAService.Attributes["class"] = activeTab;
                    break;
                case ThisSession.AvailableTab.FindRx:
                    ThisSession.SelectedTab = ThisSession.AvailableTab.FindRx;
                    liFindRx.Attributes["class"] = activeTab;
                    break;
                case ThisSession.AvailableTab.FindADoc:
                    ThisSession.SelectedTab = ThisSession.AvailableTab.FindADoc;
                    liFindADoc.Attributes["class"] = activeTab;
                    break;
                case ThisSession.AvailableTab.FindPastCare:
                    ThisSession.SelectedTab = ThisSession.AvailableTab.FindPastCare;
                    liPastCare.Attributes["class"] = activeTab;
                    break;
            }
        }