public ActionResult RAAAdmin() { Users user = CMSService.GetUserByUserName(username); int userId = 0; if (user != null) { userId = user.UserId; } List <int> RAAIds = new List <int>(); RAAIds = CMSService.GetPSAsByUserId(userId); UserAdministration ua = new UserAdministration(); List <viewUser> UserList = CMSService.GetRAAAdmin(RAAIds); ua.UsersToReview = UserList.Where(x => x.IsActive == false && x.IsApproved == false).ToList(); ua.Users = UserList.Where(x => x.IsActive == true && RAAIds.Any(c => x.UserPSA.PSAId == c && x.UserPSA.isActive == true)).ToList(); ua.UsersDisApproved = UserList.Where(x => x.IsDisApproved == true && x.IsActive == false).ToList(); ua.UsersInactive = UserList.Where(x => x.IsActive == false && x.IsApproved == true).ToList(); ua.PSAs = CMSService.GetPSAs().Where(c => RAAIds.Contains(c.Id)).ToList(); return(View(ua)); }