fix sort api/v1/leave/search (#1852)
Some checks failed
release-dev / release-dev (push) Failing after 12s
Some checks failed
release-dev / release-dev (push) Failing after 12s
This commit is contained in:
parent
f784205412
commit
fe4a174bf7
1 changed files with 5 additions and 10 deletions
|
|
@ -26,6 +26,7 @@ using RabbitMQ.Client;
|
|||
using RabbitMQ.Client.Events;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Diagnostics;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -1862,21 +1863,15 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
{
|
||||
case "CITIZENID":
|
||||
if (req.descending == true)
|
||||
profile = profile.OrderByDescending(x => x.CitizenId).ToList();
|
||||
resultSet = resultSet.OrderByDescending(x => x.CitizenId).ToList();
|
||||
else
|
||||
profile = profile.OrderBy(x => x.CitizenId).ToList();
|
||||
resultSet = resultSet.OrderBy(x => x.CitizenId).ToList();
|
||||
break;
|
||||
case "FULLNAME":
|
||||
if (req.descending == true)
|
||||
profile = profile.OrderByDescending(x => x.Prefix)
|
||||
.ThenByDescending(x => x.FirstName)
|
||||
.ThenByDescending(x => x.LastName)
|
||||
.ToList();
|
||||
resultSet = resultSet.OrderByDescending(x => x.FullName).ToList();
|
||||
else
|
||||
profile = profile.OrderBy(x => x.Prefix)
|
||||
.ThenBy(x => x.FirstName)
|
||||
.ThenBy(x => x.LastName)
|
||||
.ToList();
|
||||
resultSet = resultSet.OrderBy(x => x.FullName).ToList();
|
||||
break;
|
||||
case "STARTTIMEMORNING":
|
||||
if (req.descending == true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue