diff --git a/Controllers/CandidateController.cs b/Controllers/CandidateController.cs index a7fb576..2d235b0 100644 --- a/Controllers/CandidateController.cs +++ b/Controllers/CandidateController.cs @@ -651,7 +651,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers { try { - await _candidateService.AdminCheckCandidateService(candidate, item.Status ? "checkSeat" : "rejectPayment", item); + await _candidateService.AdminCheckCandidateService(candidate, item.Status ? "done" : "rejectPayment", item); return Success(); } diff --git a/Services/PeriodExamService.cs b/Services/PeriodExamService.cs index ffa9ca9..789d2d8 100644 --- a/Services/PeriodExamService.cs +++ b/Services/PeriodExamService.cs @@ -129,9 +129,18 @@ namespace BMA.EHR.Recurit.Exam.Service.Services if (periodExam == null) throw new Exception(GlobalMessages.ExamNotFound); - return await _context.Candidates.AsQueryable() - .Where(x => x.PeriodExam == periodExam && x.Status == status) - .ToListAsync(); + if (status == "all") + { + return await _context.Candidates.AsQueryable() + .Where(x => x.PeriodExam == periodExam && x.Status != "register" && x.Status != "rejectRegister") + .ToListAsync(); + } + else + { + return await _context.Candidates.AsQueryable() + .Where(x => x.PeriodExam == periodExam && x.Status == status) + .ToListAsync(); + } } #endregion