Пример #1
0
        /*----------------------------------------------------*/

        public void Validate_ReturnHome_NavigationItem()
        {
            if (ModuleUser.MasterNavElement != null)
            {
                cNavElement aReturnHomeNavElement = ModuleUser.MasterNavElement.Find_ChildElement("ReturnHome");

                if (aReturnHomeNavElement != null)
                {
                    cModuleState aModuleState = WebSession.ModuleState("Home");
                    if (aModuleState == null && WebSession.HasStaffUser)
                    {
                        aModuleState = WebSession.ModuleState("Staff");
                    }
                    if (aModuleState != null)
                    {
                        //WebSession.Remove_ModuleState("Home");
                        aReturnHomeNavElement.Visible    = true;
                        aReturnHomeNavElement.Enabled    = true;
                        aReturnHomeNavElement.SourceFile = WebAppl.Remove_RootFromURL(aModuleState.LastURL);
                        String aDefaultPageKey = ReturnHomeModuleDefaultPageKey();
                        aReturnHomeNavElement.SourceFile = cWebLib.AddQuerystringParameter(aReturnHomeNavElement.SourceFile, "Page", aDefaultPageKey);
                    }
                    else
                    {
                        aReturnHomeNavElement.Visible = false;
                    }
                }
            }
        }
Пример #2
0
/*----------------------------------------------------*/

        public void Validate_Logout_NavigationItem()
        {
            if (ModuleUser.MasterNavElement != null)
            {
                cNavElement aLogoutNavElement = ModuleUser.MasterNavElement.Find_ChildElement("Logout");

                if (aLogoutNavElement != null)
                {
                    cModuleState aModuleState = WebSession.ModuleState("Home");
                    if (aModuleState == null && WebSession.HasStaffUser)
                    {
                        aModuleState = WebSession.ModuleState("Staff");
                    }
                    if (aModuleState != null)
                    {
                        aLogoutNavElement.SourceFile = WebAppl.Remove_RootFromURL(aModuleState.LastURL);
                        aLogoutNavElement.SourceFile = cWebLib.AddQuerystringParameter(aLogoutNavElement.SourceFile, "Page", aLogoutNavElement.Key);
                    }
                }
            }
        }