diff --git a/Request/RequestApproveShowExamInfo.cs b/Request/RequestApproveShowExamInfo.cs index b4c5431..f5d5ab8 100644 --- a/Request/RequestApproveShowExamInfo.cs +++ b/Request/RequestApproveShowExamInfo.cs @@ -5,5 +5,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Request public class RequestApproveShowExamInfo { public string? ExamId { get; set; } + + public bool? Status { get; set; } } } diff --git a/Services/CandidateService.cs b/Services/CandidateService.cs index 8139318..e760bbe 100644 --- a/Services/CandidateService.cs +++ b/Services/CandidateService.cs @@ -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();