fix sort order condition
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m15s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m15s
This commit is contained in:
parent
83a915f92c
commit
510f1cd78a
1 changed files with 1 additions and 1 deletions
|
|
@ -2251,7 +2251,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
}
|
||||
//employees = employees.OrderBy(x => x.checkInDate).ThenBy(x => x.checkInTimeRaw ?? DateTime.MaxValue).ThenBy(x => x.checkOutTimeRaw ?? DateTime.MaxValue).ToList();
|
||||
employees = employees
|
||||
.OrderBy(x => x.checkInTime.Trim() == "" ? 1 : 0) // เรียงตามวันที่ลงเวลา
|
||||
.OrderBy(x => x.checkInTime.Trim() != "" ? 0 : 1) // เรียงตามวันที่ลงเวลา
|
||||
.ThenBy(x => x.remark.Trim() == "" ? 0 : 1) // ข้อมูลที่ไม่มี remark ให้ขึ้นก่อน
|
||||
.ThenBy(x => x.checkInTimeRaw ?? DateTime.MaxValue).ThenBy(x => x.checkOutTimeRaw ?? DateTime.MaxValue)
|
||||
.ThenBy(x => x.remark) // จากนั้นจัดเรียงตาม remark
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue