# region lowercase to uppercase
private string getnumtoupper (decimal money)
{< br> string numlist = "";
string rmblist = "";
int numlen = 0;
int numchar = 0;
string n1 = "";
string n2 = "";
decimal MNU = 0;
int I = 0;
string numstr = "";
string change = "";
MNU = money;
If (money> 0)
{
Money = convert. todecimal (money. tostring ("#. 00 "));
}
Else
{
Money = convert. todecimal (money. tostring ("#. 00") *-1;
}
Numlist = "";
Rmblist = "yuanqibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaibaiwan ";
If (money> 9999999999999.99 m)
{
Return "-------"; // The value of RMB out of the range cannot be displayed !;
}
Numstr = convert. tostring (convert. todecimal (money * 100). tostring ("#"));
Numlen = numstr. length;
I = 0;
While (I <= numlen-1)
{
Numchar = convert. toint32 (numstr. substring (I, 1 ));
N1 = numlist. substring (numchar, 1 );
N2 = rmblist. substring (numlen-I-1, 1 );
If (N1! = "0 ")
{
Change + = N1 + N2;
}
Else
{
If (n2 = "" | n2 = "" | n2 = "" | n1 = "0 ")
{
While (change. substring (change. Length-1, 1) = "0 ")
{
Change = change. substring (0, change. Length-1 );
}
}
If (n2 = "" | (n2 = "" & change. substring (change. Length-1, 1 )! = "") | N2 = "")
{
Change + = n2;
}
Else
{
If (change. substring (change. length-2, 2 ). substring (0, 1) = "zero" | change. substring (change. length-1, 1 )! = "")
{
Change + = N1;
}
}
}
I ++;
}
If (change. length> 1)
{
While (change. substring (change. Length-1, 1) = "0 ")
{
Change = change. substring (0, change. Length-1 );
}
If (change. substring (change. Length-1, 1) = "" | change. substring (change. Length-1, 1) = "")
{
Change + = "whole ";
}
}
If (MNU> 0)
{
Return change;
}
Else
{
If (MNU <0)
{
Return "negative" + change;
}
Else
{
Return "Zero RMB ";
}
}
}
# Endregion