Get command Receiver For C-PM-03 , C-PM-04
This commit is contained in:
parent
6253d8d2ab
commit
9b3efd8981
2 changed files with 155 additions and 1 deletions
|
|
@ -43,7 +43,24 @@ namespace BMA.EHR.Application.Repositories
|
|||
|
||||
#region " Methods "
|
||||
|
||||
public async Task<bool> CheckIsActiveOfficer(string citizenId)
|
||||
public async Task<Guid> GetProfileOrganizationAsync(string citizenId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var pf = await _dbContext.Set<Profile>()
|
||||
.Where(x => x.CitizenId == citizenId)
|
||||
.Where(x => x.ProfileType.ToLower().Trim() == "officer" && x.IsActive && !x.IsLeave)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
return pf == null || pf.Oc == null ? Guid.Empty : pf.OcId!.Value;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> CheckIsActiveOfficerAsync(string citizenId)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue