EditCode class | QSYS API Reference Guide
Estimated reading time: 4 minutes
Provides methods to format numeric values according to Edit Code
Namespace: ASNA.QSys.Expo.Model
Assembly: ASNA.QSys.Expo.Model.dll
Inheritance: Object
The formatting rules are equivalent to those supported by IBM i Edit Codes
Methods
Signature |
Description |
Apply(Decimal, Int32, Int32, EditCodes, Boolean) |
Gets a string value representing the given numeric value after formatting it according to an Edit Code |
Apply(Decimal, Int32, Int32, EditCodes, String) |
Gets a string value representing the given numeric value after formatting it according to an Edit Code |
ApplyEditCode(EditCodes, Int32, Int32, String, Char, Char, Char, Boolean) |
Gets a string value representing the given input string after formatting the value in the string according to given Edit Code |
FromChar(Char) |
Gets the EditCodes enumeration given a character code. |
ToChar(EditCodes) |
Gets a char value representing the enumeration element. |
UsesThousandsSeparator(EditCodes) |
Gets a boolean value indicating that the given Edit Code uses thousands separator. |
Gets a string value representing the given numeric value after formatting it according to an Edit Code
string Apply(decimal numeric, int decimals, int length, EditCodes editCode, bool isAsteriskFill)
Parameters
Type |
Parameter name |
Description |
Decimal |
numeric |
input numeric value |
Int32 |
decimals |
field decimal positions |
Int32 |
length |
field length |
EditCodes |
editCode |
Edit Code |
Boolean |
isAsteriskFill |
true if value should be filled with * |
Returns
Type |
Description |
String |
the formatted value as string |
Gets a string value representing the given numeric value after formatting it according to an Edit Code
string Apply(decimal numeric, int decimals, int length, EditCodes editCode, string currencySymbol)
Parameters
Type |
Parameter name |
Description |
Decimal |
numeric |
input numeric value |
Int32 |
decimals |
field decimal positions |
Int32 |
length |
field length |
EditCodes |
editCode |
Edit Code |
String |
currencySymbol |
currency symbol |
Returns
Type |
Description |
String |
the formatted value as string |
Gets a string value representing the given input string after formatting the value in the string according to given Edit Code
string ApplyEditCode(EditCodes editCode, int decimals, int length, string inputString, char decimalPoint, char thousandSeparator, char currencySymbol, bool isAsteriskFill)
Parameters
Type |
Parameter name |
Description |
EditCodes |
editCode |
Edit Code |
Int32 |
decimals |
field decimal positions |
Int32 |
length |
field length |
String |
inputString |
input numeric value in a string |
Char |
decimalPoint |
decimal point symbol |
Char |
thousandSeparator |
thousands separator symbol |
Char |
currencySymbol |
currency symbol |
Boolean |
isAsteriskFill |
true if value should be filled with * |
Returns
Type |
Description |
String |
the formatted value as string |
Gets the EditCodes enumeration given a character code.
EditCodes FromChar(char editCodeChar)
Parameters
Type |
Parameter name |
Description |
Char |
editCodeChar |
input char |
Returns
Gets a char value representing the enumeration element.
char ToChar(EditCodes editCode)
Parameters
Type |
Parameter name |
Description |
EditCodes |
editCode |
input Edit code |
Returns
Type |
Description |
Char |
the char code |
Gets a boolean value indicating that the given Edit Code uses thousands separator.
bool UsesThousandsSeparator(EditCodes editCode)
Parameters
Type |
Parameter name |
Description |
EditCodes |
editCode |
inpu Edit Code |
Returns
Type |
Description |
Boolean |
true if editCode uses thousands separator |