api ใบสรุปสมัครสอบ
This commit is contained in:
parent
ab86c20b84
commit
9f115e3c72
5 changed files with 106 additions and 15 deletions
|
|
@ -622,10 +622,22 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (periodExam == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
||||
var candidates = await _context.Candidates
|
||||
.AsQueryable()
|
||||
.Where(x => x.PeriodExam == periodExam)
|
||||
.ToListAsync();
|
||||
var candidates = new List<Candidate>();
|
||||
if (periodExam.SetSeat == true)
|
||||
{
|
||||
candidates = await _context.Candidates
|
||||
.AsQueryable()
|
||||
.Where(x => x.PeriodExam == periodExam)
|
||||
.Where(x => x.Status != "waiver")
|
||||
.ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
candidates = await _context.Candidates
|
||||
.AsQueryable()
|
||||
.Where(x => x.PeriodExam == periodExam)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
var stream = new MemoryStream();
|
||||
using (var package = new ExcelPackage(stream))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue