Merge branch 'develop' into working

This commit is contained in:
Suphonchai Phoonsawat 2023-08-08 12:37:24 +07:00
commit 9ff5725be4
18 changed files with 14169 additions and 72 deletions

View file

@ -212,12 +212,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -607,12 +607,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -825,12 +825,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -1044,12 +1044,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -1366,12 +1366,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -1489,12 +1489,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -1793,12 +1793,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -2017,12 +2017,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -2329,12 +2329,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -2673,12 +2673,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -3011,12 +3011,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -3228,12 +3228,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -3541,12 +3541,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -3826,12 +3826,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -4147,12 +4147,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
@ -4689,12 +4689,12 @@ namespace BMA.EHR.Application.Repositories
// var period = await _dbContext.Set<InsigniaPeriods>().FirstOrDefault(p => p.Id == periodId);
// if (period == null)
// throw new Exception(GlobalMessages.InvalidCoinPeriod);
// throw new Exception(GlobalMessages.CoinPeriodNotFound);
// var oc = await _dbContext.Set<OrganizationCharts>().FirstOrDefault(x => x.OCId == ocId);
// if (oc == null)
// throw new Exception(GlobalMessages.InvalidOC);
// throw new Exception(GlobalMessages.OCNotFound);
// var result = await _dbContext.Set<Profile>()
// .Include(p => p.Position)
@ -4970,7 +4970,7 @@ namespace BMA.EHR.Application.Repositories
// var req = await _dbContext.Set<InsigniaRequests>().FirstOrDefault(x => x.Id == id);
// if (req == null)
// throw new Exception(GlobalMessages.InvalidInsigniaRequest);
// throw new Exception(GlobalMessages.InsigniaNotFound);
// var profile = await _dbContext.Set<InsigniaRequestsProfiles>().AsQueryable()
// .Include(x => x.RequestInsignia)
@ -5060,12 +5060,12 @@ namespace BMA.EHR.Application.Repositories
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
throw new Exception(GlobalMessages.InvalidCoinPeriod);
throw new Exception(GlobalMessages.CoinPeriodNotFound);
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == ocId);
if (oc == null)
throw new Exception(GlobalMessages.InvalidOC);
throw new Exception(GlobalMessages.OCNotFound);
var req = new InsigniaRequest
{