Refactor LeaveBeginningController to simplify duplicate check and comment out LeaveYear property in EditLeaveBeginningDto #2341
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m41s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m41s
This commit is contained in:
parent
006cea048d
commit
f866435897
2 changed files with 3 additions and 4 deletions
|
|
@ -590,8 +590,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
return Error("ไม่พบข้อมูลข้าราชการหรือลูกจ้าง", StatusCodes.Status404NotFound);
|
||||
}
|
||||
// check duplicate
|
||||
var oldData = await _context.LeaveBeginnings.Where(x => x.ProfileId == req.ProfileId
|
||||
&& x.LeaveYear == req.LeaveYear).ToListAsync();
|
||||
var oldData = await _context.LeaveBeginnings.Where(x => x.ProfileId == req.ProfileId).ToListAsync();
|
||||
|
||||
foreach(var item in oldData)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue