Esempio n. 1
0
        /// <summary>
        /// 删除后台管理导航
        /// </summary>
        public void RemoveMenuNodes(string dirPath, string xPath)
        {
            XmlNodeList xnList = XmlHelper.ReadNodes(dirPath + DTKeys.FILE_PLUGIN_XML_CONFING, xPath);

            if (xnList.Count > 0)
            {
                DAL.navigation dal = new navigation(databaseprefix);
                foreach (XmlElement xe in xnList)
                {
                    if (xe.NodeType != XmlNodeType.Comment && xe.Name.ToLower() == "nav")
                    {
                        //删除导航记录
                        if (xe.Attributes["name"] != null)
                        {
                            int nav_id = dal.GetNavId(xe.Attributes["name"].Value);
                            if (nav_id > 0)
                            {
                                dal.Delete(nav_id);
                            }
                        }
                    }
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 删除后台管理导航
 /// </summary>
 public void RemoveMenuNodes(string dirPath, string xPath)
 {
     XmlNodeList xnList = XmlHelper.ReadNodes(dirPath + DTKeys.FILE_PLUGIN_XML_CONFING, xPath);
     if (xnList.Count > 0)
     {
         DAL.navigation dal = new navigation(databaseprefix);
         foreach (XmlElement xe in xnList)
         {
             if (xe.NodeType != XmlNodeType.Comment && xe.Name.ToLower() == "nav")
             {
                 //删除导航记录
                 if (xe.Attributes["name"] != null)
                 {
                     int nav_id = dal.GetNavId(xe.Attributes["name"].Value);
                     if (nav_id > 0)
                     {
                         dal.Delete(nav_id);
                     }
                 }
             }
         }
     }
 }