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 RabbitMQ.Client.Events;
|
||||||
using Swashbuckle.AspNetCore.Annotations;
|
using Swashbuckle.AspNetCore.Annotations;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
@ -1862,21 +1863,15 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
case "CITIZENID":
|
case "CITIZENID":
|
||||||
if (req.descending == true)
|
if (req.descending == true)
|
||||||
profile = profile.OrderByDescending(x => x.CitizenId).ToList();
|
resultSet = resultSet.OrderByDescending(x => x.CitizenId).ToList();
|
||||||
else
|
else
|
||||||
profile = profile.OrderBy(x => x.CitizenId).ToList();
|
resultSet = resultSet.OrderBy(x => x.CitizenId).ToList();
|
||||||
break;
|
break;
|
||||||
case "FULLNAME":
|
case "FULLNAME":
|
||||||
if (req.descending == true)
|
if (req.descending == true)
|
||||||
profile = profile.OrderByDescending(x => x.Prefix)
|
resultSet = resultSet.OrderByDescending(x => x.FullName).ToList();
|
||||||
.ThenByDescending(x => x.FirstName)
|
|
||||||
.ThenByDescending(x => x.LastName)
|
|
||||||
.ToList();
|
|
||||||
else
|
else
|
||||||
profile = profile.OrderBy(x => x.Prefix)
|
resultSet = resultSet.OrderBy(x => x.FullName).ToList();
|
||||||
.ThenBy(x => x.FirstName)
|
|
||||||
.ThenBy(x => x.LastName)
|
|
||||||
.ToList();
|
|
||||||
break;
|
break;
|
||||||
case "STARTTIMEMORNING":
|
case "STARTTIMEMORNING":
|
||||||
if (req.descending == true)
|
if (req.descending == true)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue