Exemple #1
0
/*====================================================*/

        public void CorePage_LoadStyles(HtmlGenericControl aStyleSpan)
        {
            String aStylesPath;

            aStylesPath = WebAppl.DefaultStylesPath;
            if (aStylesPath != "")
            {
                aStylesPath = WebAppl.Build_RootURL(aStylesPath);
                CorePage_LoadControl(aStylesPath, "ctlStyles", aStyleSpan);
            }
        }
Exemple #2
0
        /*----------------------------------------------------*/

        private String ReturnHomeModuleDefaultPageKey()
        {
            XmlNode aApplNode         = WebAppl.Get_ApplNode();
            XmlNode aModulesNode      = cXMLDoc.FindNode(aApplNode, "Modules/Module", "Key", "Home");
            String  aModuleConfigName = cXMLDoc.AttributeToString(aModulesNode, "ConfigFile");
            cXMLDoc aModuleConfigDoc  = new cXMLDoc();

            aModuleConfigDoc.Load(Server.MapPath(Get_ConfigurationPath(aModuleConfigName) + aModuleConfigName));
            XmlNode ModuleNode      = aModuleConfigDoc.DocElement.SelectSingleNode("Module");
            String  aDefaultPageKey = cXMLDoc.AttributeToString(ModuleNode, "DefaultPageKey");

            return(aDefaultPageKey);
        }
Exemple #3
0
        public String GetLabel(string LabelName)
        {
            //cDataObjectList aLabelHeaderDOL=WebSession.DataObjectFactory.GetDataObjectListWithFilter("HeaderLabel","LabelName",LabelName);
            //XmlNode aConfigurableLabels = WebAppl.ConfigurableLabels;
            //XmlNode aLabelNode = cXMLDoc.FindNode(aConfigurableLabels, "Label", "Name", LabelName);
            string aLabelText = WebAppl.ConfigLabelsCollection(LabelName);

            if (aLabelText == null)
            {
                return("");
            }
            else
            {
                return(aLabelText);
            }
        }
Exemple #4
0
/*-----------------------------------------------------*/

        public void Page_Load(Object aSrc, EventArgs aEvent)
        {
            //cLib.Runtime_Error();

            WebSession.CurrentPage = this;
            if (CorePage_Valid(aSrc, aEvent))
            {
                CorePage_RegisterScriptBlock(WebAppl.Build_RootURL("Core/Includes/Easygrants.js"), "EasygrantsJS");
                CorePage_RegisterScriptBlock(WebAppl.Build_RootURL("Core/Includes/ClientImplementation.js"), "ClientImplementationJS");
                CorePage_Load(aSrc, aEvent);
            }
            else
            {
                Response.Redirect(WebAppl.LogoutURL);
            }
        }
Exemple #5
0
/*-----------------------------------------------------*/

        public void Page_Error(object sender, EventArgs e)
        {
            if (Server.GetLastError().GetBaseException().GetType().ToString() != "System.Threading.ThreadAbortException")
            {
                WebSession.CurrentException = Server.GetLastError().GetBaseException();
                WebAppl.LogException(WebSession.CurrentException);
                WebSession.CurrentUrl = Request.Url.PathAndQuery;
                String aSystemError = System.Configuration.ConfigurationSettings.AppSettings["SystemError"];
                if (aSystemError != "" && aSystemError != null)
                {
                    String aUrl = WebAppl.Build_RootURL(aSystemError);
                    Response.Redirect(aUrl);
                }
            }
            else
            {
                Server.ClearError();
            }
        }
Exemple #6
0
/*----------------------------------------------------*/

        public bool LoadPageContent_FromXML()
        {
            XmlNode aPageNode;

            aPageNode = PageNode;
            if (aPageNode == null)
            {
                return(false);
            }

            PageNavKey      = cXMLDoc.AttributeToString(aPageNode, "NavKey");
            PageHorizNavKey = cXMLDoc.AttributeToString(aPageNode, "HorizNavKey");

            Control aPgContentTDCell;

            aPgContentTDCell = mPageFrameCtl.FindControl("tdPageContent");
            mPageContentCtl  = CorePage_LoadControl(WebAppl.Build_RootURL(cXMLDoc.AttributeToString(aPageNode, "ContentCtl")),
                                                    "ctlPageContent", aPgContentTDCell);
            return(true);
        }
Exemple #7
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);
                    }
                }
            }
        }
Exemple #8
0
/*-----------------------------------------------------*/

	public cEGUser EGUser_From_ModuleConfig(String aModuleName, String aModuleConfig, out cXMLDoc aModuleDoc) {		
	
		return EGUser_From_ModuleConfig (WebAppl.Get_ModuleRoot(aModuleName) + "/" + aModuleName + "/" + aModuleConfig, out aModuleDoc);
	}