format year to thai
This commit is contained in:
parent
40861853dd
commit
3ed1eed02d
1 changed files with 11 additions and 1 deletions
|
|
@ -42,10 +42,20 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
.FirstOrDefaultAsync(x => x.Id == id);
|
.FirstOrDefaultAsync(x => x.Id == id);
|
||||||
if (period == null)
|
if (period == null)
|
||||||
throw new Exception(GlobalMessages.InsigniaPeriodNotFound);
|
throw new Exception(GlobalMessages.InsigniaPeriodNotFound);
|
||||||
string thaiYear = period.Year.ToThaiYear().ToString();
|
string thaiYear = period.Year.ToThaiYear().ToString().ToThaiNumber();
|
||||||
return thaiYear;
|
return thaiYear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<dynamic> Get2YearInsigniaPeriod(Guid id)
|
||||||
|
{
|
||||||
|
var period = await _dbContext.Set<InsigniaPeriod>()
|
||||||
|
.FirstOrDefaultAsync(x => x.Id == id);
|
||||||
|
if (period == null)
|
||||||
|
throw new Exception(GlobalMessages.InsigniaPeriodNotFound);
|
||||||
|
string thaiYear = period.Year.ToThaiYear().ToString().ToThaiNumber();
|
||||||
|
return thaiYear.Substring(2);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<dynamic> GetKhr1Report(Guid id)
|
public async Task<dynamic> GetKhr1Report(Guid id)
|
||||||
{
|
{
|
||||||
var period = await _dbContext.Set<InsigniaPeriod>()
|
var period = await _dbContext.Set<InsigniaPeriod>()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue