User ต้องการให้สามารถ "ปิด" การดาวน์โหลดใบสมัครสอบได้ #2041
This commit is contained in:
parent
5d32bfd26c
commit
3f769d0d75
2 changed files with 5 additions and 3 deletions
|
|
@ -5,5 +5,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public class RequestApproveShowExamInfo
|
||||
{
|
||||
public string? ExamId { get; set; }
|
||||
|
||||
public bool? Status { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2276,7 +2276,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
public async Task AdminCheckShowExamInfoService(string examId)
|
||||
public async Task AdminCheckShowExamInfoService(string examId, bool status)
|
||||
{
|
||||
var examGuid = Guid.Parse(examId);
|
||||
var periodExam = await _context.PeriodExams.AsQueryable()
|
||||
|
|
@ -2287,7 +2287,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
|
||||
var candidates = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.PeriodExam)
|
||||
.Where(x => x.PeriodExam.Id == examGuid && x.IsShowExamInfo == false)
|
||||
.Where(x => x.PeriodExam.Id == examGuid /*&& x.IsShowExamInfo == false*/)
|
||||
.ToListAsync();
|
||||
|
||||
foreach (var candidate in candidates)
|
||||
|
|
@ -2295,7 +2295,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (candidate.Status.Trim().ToUpper() == "REGISTER" && candidate.Status.Trim().ToUpper() == "CHECKREGISTER" && candidate.Status.Trim().ToUpper() == "PAYMENT")
|
||||
continue;
|
||||
|
||||
candidate.IsShowExamInfo = true;
|
||||
candidate.IsShowExamInfo = status;
|
||||
}
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue