Add Paging
This commit is contained in:
parent
d1ca7e9ab1
commit
9e95fb5572
5 changed files with 7 additions and 7649 deletions
|
|
@ -675,7 +675,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<dynamic>> GetsCandidateByStatusAsync(string examId, string status)
|
||||
public async Task<IEnumerable<dynamic>> GetsCandidateByStatusAsync(string examId, string status, int page = 1, int pageSize = 25)
|
||||
{
|
||||
var periodExam = await _context.PeriodExams.AsQueryable()
|
||||
.Where(x => x.CheckDisability == false)
|
||||
|
|
@ -691,6 +691,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
// .Include(x => x.ProfileImg)
|
||||
.OrderByDescending(d => d.CreatedAt)
|
||||
.Where(x => x.PeriodExam == periodExam && x.RegisterDate != null && x.Status != "register" && x.Status != "rejectRegister")
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.Select(x => new
|
||||
{
|
||||
Id = x.Id,
|
||||
|
|
@ -731,6 +733,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
// .Include(x => x.ProfileImg)
|
||||
.OrderByDescending(d => d.CreatedAt)
|
||||
.Where(x => x.PeriodExam == periodExam && x.Status == status)
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.Select(x => new
|
||||
{
|
||||
Id = x.Id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue