Beispiel #1
0
 //获得菜单的根节点
 public Menu GetRootItem()
 {
     try
     {
         List <Menu> res = db_menus.GetMenu("root");
         if (res.Count > 1)
         {
             throw new Exception("DB has not only one root item");
         }
         return(res[0]);
     }
     catch (Exception e)
     {
         return(null);
     }
 }