Merge branch 'develop' into work

This commit is contained in:
Kittapath 2023-08-23 20:32:58 +07:00
commit 9c610407f4
272 changed files with 3435 additions and 163 deletions

View file

@ -1,3 +1,5 @@
using System.Text;
namespace BMA.EHR.Domain.Extensions
{
public static class IntegerExtension
@ -40,5 +42,25 @@ namespace BMA.EHR.Domain.Extensions
{
return number.ToString("#,##0");
}
public static string ToThaiNumber(this string value)
{
string arabicNumbers = "0123456789";
string thaiNumbers = "๐๑๒๓๔๕๖๗๘๙";
StringBuilder ThaiYear = new StringBuilder();
foreach (char digit in value)
{
int index = arabicNumbers.IndexOf(digit);
if (index >= 0)
{
ThaiYear.Append(thaiNumbers[index]);
}
else
{
ThaiYear.Append(digit);
}
}
return ThaiYear.ToString();
}
}
}

View file

@ -4,5 +4,9 @@
{
public static readonly string TYPE_ATTACHMENT = "attachment";
public static readonly string TYPE_COVER = "cover";
public static readonly string EXPORT_PDF = "PDF";
public static readonly string EXPORT_WORD = "DOCX";
public static readonly string EXPORT_EXCEL = "XLSX";
}
}