Esempio n. 1
0
        public static bool UpdateHeadMenuNode(int menuId, System.Collections.Generic.Dictionary <string, string> headmenunode)
        {
            string      filename        = HttpContext.Current.Request.MapPath(HiContext.Current.GetSkinPath() + "/config/HeaderMenu.xml");
            bool        result          = false;
            XmlDocument commentDocument = TagsHelper.GetCommentDocument();
            XmlNode     xmlNode         = TagsHelper.FindHeadMenuNode(menuId);

            if (xmlNode != null)
            {
                foreach (System.Collections.Generic.KeyValuePair <string, string> current in headmenunode)
                {
                    xmlNode.Attributes[current.Key].Value = current.Value;
                }
                commentDocument.Save(filename);
                TagsHelper.RemoveHeadMenuCache();
                result = true;
            }
            return(result);
        }
Esempio n. 2
0
        public static bool UpdateCommentNode(int commentId, string type, System.Collections.Generic.Dictionary <string, string> commentnode)
        {
            bool        result          = false;
            string      filename        = HttpContext.Current.Request.MapPath(HiContext.Current.GetSkinPath() + "/config/Comments.xml");
            XmlDocument commentDocument = TagsHelper.GetCommentDocument();
            XmlNode     xmlNode         = TagsHelper.FindCommentNode(commentId, type);

            if (xmlNode != null)
            {
                foreach (System.Collections.Generic.KeyValuePair <string, string> current in commentnode)
                {
                    xmlNode.Attributes[current.Key].Value = current.Value;
                }
                commentDocument.Save(filename);
                TagsHelper.RemoveCommentNodeCache();
                result = true;
            }
            return(result);
        }
Esempio n. 3
0
        public static XmlNode FindHeadMenuNode(int int_0)
        {
            XmlDocument headMenuDocument = TagsHelper.GetHeadMenuDocument();

            return(headMenuDocument.SelectSingleNode(string.Format("//Menu[@Id='{0}']", int_0)));
        }
Esempio n. 4
0
        public static XmlNode FindCommentNode(int int_0, string type)
        {
            XmlDocument commentDocument = TagsHelper.GetCommentDocument();

            return(commentDocument.SelectSingleNode(string.Format("//Comment[@Id='{0}' and @Type='{1}']", int_0, type)));
        }
Esempio n. 5
0
        public static XmlNode FindAdNode(int int_0, string type)
        {
            XmlDocument adDocument = TagsHelper.GetAdDocument();

            return(adDocument.SelectSingleNode(string.Format("//Ad[@Id='{0}' and @Type='{1}']", int_0, type)));
        }
Esempio n. 6
0
        public static XmlNode FindProductNode(int subjectId, string type)
        {
            XmlDocument productDocument = TagsHelper.GetProductDocument();

            return(productDocument.SelectSingleNode(string.Format("//Subject[@SubjectId='{0}' and @Type='{1}']", subjectId, type)));
        }