จัดformat วันที่รายงานเครื่องราช 46

This commit is contained in:
DESKTOP-2S5P7D1\Windows 10 2023-09-05 13:10:45 +07:00
parent 4ebce54423
commit 561ef617b6
2 changed files with 5 additions and 1 deletions

View file

@ -479,7 +479,7 @@ namespace BMA.EHR.Application.Repositories.Reports
DateTh = r.Date == null ? "-" : r.Date.Value.ToThaiShortDate().ToString().ToThaiNumber(),
Position = p.Name,
OCName = o.Parent == null ? "-" : (o.Parent.OrganizationOrganization == null ? "-" : o.Parent.OrganizationOrganization.Name),
Age = r.Date == null ? "-" : r.Date.Value.CalculateAgeStrV2(0, 0).ToThaiNumber(),
Age = r.Date == null ? "-" : r.Date.Value.CalculateBetweenDateV2(DateTime.Now).ToThaiNumber(),
Amount = r.Amount == null ? null : r.Amount.Value.ToNumericText().ToThaiNumber(),
Date = r.Date,
})

View file

@ -69,6 +69,10 @@ namespace BMA.EHR.Domain.Extensions
{
return number.ToString("#,##0.00");
}
public static string ToNumericNoDecimalText(this double number)
{
return number.ToString("#,##");
}
public static string ToReadText(this double value)
{