- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
public static string ConvertNumberToString(double tmpStr)
{
string ret = "";
try
{
if (((long)tmpStr).ToString().Length > 3)
{
string len = ((long)tmpStr).ToString();
string[] strSplit = tmpStr.ToString().Split(',');
long tmpM = 0;
if (strSplit.Length > 1)
tmpM = Convert.ToInt64(strSplit[1]);
int count = (int)len.Length / 3;
ret = len.Substring(0, (len.Length - 3 * count));
for (int i = 0; i < count; i++)
{
ret += " " + len.Substring((ret.Length - i), 3);
}
if (tmpM > 0)
{
ret += "," + strSplit[1];
}
}
else
ret = tmpStr.ToString();
}
catch
{
}
return ret.Trim();
}