Пример #1
0
        public void TestGetUserMenu()
        {
            UserMenuService   service   = new UserMenuService();
            int               userID    = 2;
            UserMenuViewModel ViewModel = service.GetUserMenuViewModel(userID);

            Console.WriteLine(UtilTest.GetJson(ViewModel));
        }
Пример #2
0
 /// <summary>
 /// 根据用户ID获取用户的菜单
 /// </summary>
 /// <param name="userID"></param>
 /// <returns>返回:传入用户的菜单ID数组</returns>
 public object Get(string userID)
 {
     try
     {
         return(service.GetUserMenuViewModel(Convert.ToInt32(userID)));
     }
     catch (Exception e)
     {
         return(e.Message);
     }
 }