示例#1
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);
        }
示例#2
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);
        }
示例#3
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)));
        }