Esempio n. 1
0
 public void OnGet(string searchString, int pageIndex = 1)
 {
     UserIndexVM = _userService.GetUserListVm(SearchString, UserRole, pageIndex);
     if (string.IsNullOrEmpty(HttpContext.Session.GetString("IDUser")))
     {
         Response.Redirect("http://localhost:5000/Login");
     }
 }
Esempio n. 2
0
        public async Task <IActionResult> Index(string Id, CancellationToken cancellationToken)
        {
            User user = await _userManager.Users.Where(u => u.Id.Equals(Id)).Include(u => u.AttendanceLists).AsNoTracking().FirstOrDefaultAsync(cancellationToken);

            UserIndexVm model = new UserIndexVm
            {
                AttendaceLists = _mapper.Map <List <AttendaceListModel> >(user.AttendanceLists)
            };

            return(View(model));
        }