ค้นหาคนเกษียณ

This commit is contained in:
Kittapath 2023-07-22 23:12:14 +07:00
parent 6d655f3f3b
commit b800b9e60d

View file

@ -15,7 +15,6 @@ using System.Drawing;
using System.Linq;
using System.Security.Claims;
using System.Security.Cryptography;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace BMA.EHR.Retirement.Service.Controllers
{
@ -189,10 +188,17 @@ namespace BMA.EHR.Retirement.Service.Controllers
}
else
{
var profiles = await _context.Profiles
// .Where(x => x.BirthDate.CalculateRetireDate().Year == year)
.Where(x => x.CitizenId == "0000000000001")
.ToListAsync();
var profiles = await _context.Profiles.AsQueryable()
// .Where(x => x.BirthDate.CalculateRetireDate().Year == year)
.Where(x => x.ProfileType.Trim().ToUpper().Contains(type.Trim().ToUpper()))
// .Where(x => x.CitizenId == "0000000000001")
.ToListAsync();
// var profiles = await (from p in _context.Profiles
// where p.BirthDate.CalculateRetireDate().Year == year
// select p)
// .ToListAsync();
profiles = profiles.Where(x=>x.BirthDate.CalculateRetireDate().Year == year).ToList();
var order = 1;
foreach (var profile in profiles)
{