예제 #1
0
    private void GetPageHelpMessage()
    {
        try
        {
            XmlDocument doc     = new XmlDocument();
            string      xmlPath = HttpContext.Current.Server.MapPath("~/XMLMessage/SageXML." + GetCurrentCultureName + ".xml");
            if (!File.Exists(xmlPath))
            {
                xmlPath = HttpContext.Current.Server.MapPath("~/XMLMessage/SageAdminHelpText.xml");
            }
            doc.Load(xmlPath);
            string URL = Request.Url.ToString().Split('?')[0];
            pageName     = GetPageSEOName(URL);
            lnkpage.Text = "Documentation on " + pageName;
            string navigateURL = "http://www.aspxcommerce.com/Page-Documentation.aspx?pageName=" + pageName;

            SageFrameConfig objSageConfig  = new SageFrameConfig();
            ApplicationInfo objApplication = objSageConfig.GetApplicationInfo("SageFrame");

            if (objApplication != null)
            {
                navigateURL += objApplication.ApplicationId.ToString();
            }
            lnkpage.NavigateUrl = navigateURL + "&V=3.0";
            XmlNode root     = doc.DocumentElement;
            XmlNode pageNode = root.SelectSingleNode(pageName.ToLower());
            if (pageNode != null)
            {
                BindPageHelpHtml(pageNode);
            }
            else
            {
                string defaultMsg = "";
                defaultMsg = "This is a newly created page.If you want to have help notification for this page go to filemanager and update in SageAdminHelpText.xml file.";
                StringBuilder description = new StringBuilder();
                description.Append("<div class='sfHorTabContentHolder' id='sfHorTabContentHolder_");
                description.Append("'><p>");
                description.Append(defaultMsg);
                description.Append("</p></div>");
                ltrPageHelp.Text = description.ToString();
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
예제 #2
0
    private void GetPageHelpMessage()
    {
        try
        {
            XmlDocument doc     = new XmlDocument();
            string      xmlPath = HttpContext.Current.Server.MapPath("~/XMLMessage/SageXML." + GetCurrentCultureName + ".xml");
            if (!File.Exists(xmlPath))
            {
                xmlPath = HttpContext.Current.Server.MapPath("~/XMLMessage/SageAdminHelpText.xml");
            }
            doc.Load(xmlPath);
            string URL = Request.Url.ToString().Split('?')[0];
            pageName     = GetPageSEOName(URL);
            lnkpage.Text = "Documentation on " + pageName;
            string navigateURL = "http://www.aspxcommerce.com/Page-Documentation.aspx?pageName=" + pageName;

            SageFrameConfig objSageConfig  = new SageFrameConfig();
            ApplicationInfo objApplication = objSageConfig.GetApplicationInfo("SageFrame");

            if (objApplication != null)
            {
                navigateURL += objApplication.ApplicationId.ToString();
            }
            lnkpage.NavigateUrl = navigateURL + "&V=2.5";
            XmlNode root     = doc.DocumentElement;
            XmlNode pageNode = root.SelectSingleNode(pageName.ToLower());
            if (pageNode != null)
            {
                BindPageHelpHtml(pageNode);
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }