From 46d380613a2fc51dabe9399d1c9876c5874e6337 Mon Sep 17 00:00:00 2001 From: harid Date: Wed, 3 Dec 2025 10:57:26 +0700 Subject: [PATCH] Fix Bug #2088 --- Services/CandidateService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Services/CandidateService.cs b/Services/CandidateService.cs index e760bbe..4a07e37 100644 --- a/Services/CandidateService.cs +++ b/Services/CandidateService.cs @@ -685,10 +685,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services if (exam == null) throw new Exception(GlobalMessages.ExamNotFound); - if (exam.RegisterStartDate != null && exam.RegisterStartDate.Value.Date > DateTime.Now.Date) + if (exam.RegisterStartDate != null && exam.RegisterStartDate.Value > DateTime.Now) throw new Exception("ยังไม่ถึงช่วงเวลาสมัครสอบ"); - if (exam.RegisterEndDate != null && exam.RegisterEndDate.Value.Date < DateTime.Now.Date) + if (exam.RegisterEndDate != null && exam.RegisterEndDate.Value < DateTime.Now) throw new Exception("หมดเวลาช่วงสมัครสอบ"); var _candidate = await _context.Candidates.AsQueryable() @@ -1985,10 +1985,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services if (exam == null) throw new Exception(GlobalMessages.ExamNotFound); - if (exam.RegisterStartDate != null && exam.RegisterStartDate.Value.Date > DateTime.Now.Date) + if (exam.RegisterStartDate != null && exam.RegisterStartDate.Value > DateTime.Now) throw new Exception("ยังไม่ถึงช่วงเวลาสมัครสอบ"); - if (exam.RegisterEndDate != null && exam.RegisterEndDate.Value.Date < DateTime.Now.Date) + if (exam.RegisterEndDate != null && exam.RegisterEndDate.Value < DateTime.Now) throw new Exception("หมดเวลาช่วงสมัครสอบ"); var candidate = await _context.Candidates.AsQueryable()