Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 37s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 37s
This commit is contained in:
commit
e7c1b49712
1 changed files with 15 additions and 0 deletions
|
|
@ -2025,6 +2025,21 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
|
|
||||||
if (status == "checkRegister")
|
if (status == "checkRegister")
|
||||||
{
|
{
|
||||||
|
// เช็คเลขบัตรซ้ำ
|
||||||
|
var candidate2 = await _context.Candidates.AsQueryable()
|
||||||
|
.Where(x =>
|
||||||
|
x.PeriodExam == exam
|
||||||
|
&& x.UserId != UserId
|
||||||
|
&& x.CitizenId == candidate.CitizenId
|
||||||
|
&& (
|
||||||
|
(exam.Fee > 0 && x.Status.Trim().ToUpper() != "REGISTER")
|
||||||
|
|| (exam.Fee == 0 && x.Status.Trim().ToUpper() == "CHECKSEAT")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
|
if (candidate2 != null)
|
||||||
|
throw new Exception(GlobalMessages.CitizanDupicate);
|
||||||
|
|
||||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + exam.Name;
|
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + exam.Name;
|
||||||
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: ได้รับใบสมัครแล้ว";
|
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: ได้รับใบสมัครแล้ว";
|
||||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue