Exemplo n.º 1
0
 /// <summary>
 /// 所有用户信息
 /// </summary>
 /// <param name="page"></param>
 /// <param name="limit"></param>
 /// <returns></returns>
 public BaseResult List(users users, int page, int limit)
 {
     if (users.dicvalue != "0")
     {
         var single = dalUser.SingleUsers(users.id);
         result.code  = 0;
         result.count = dalUser.Count((int)(single.level));
         result.data  = dalUser.List((int)(single.level), page, limit);
         return(result);
     }
     result.code  = 0;
     result.count = dalUser.Count();
     result.data  = dalUser.List(page, limit);
     return(result);
 }
Exemplo n.º 2
0
 public IActionResult AddIndex(int id = 0)
 {
     ViewData["id"] = id;
     if (id > 0)
     {
         return(View(dalUser.SingleUsers(id)));
     }
     return(View());
 }