Class DataEntryUtils
Provides misc data-entry parsing routines
Inheritance
System.Object
DataEntryUtils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: NFX.dll
Syntax
public static class DataEntryUtils
Methods
CheckEMail(String)
Returns true if the value is a valid non-null/empty email address
Declaration
public static bool CheckEMail(string email)
Parameters
| Type |
Name |
Description |
| System.String |
email |
|
Returns
| Type |
Description |
| System.Boolean |
|
CheckScreenName(String)
Returns true if the value starts from primary language char and contains only those chars separated by one of ['.','-','_'].
Subsequent separators not to occur more than once and can not be at the very end. This function supports Latin/Cyrrilic char sets
Declaration
public static bool CheckScreenName(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
Returns
| Type |
Description |
| System.Boolean |
|
CheckTelephone(String)
Returns true if the value is a valid non-null/empty telephone
Declaration
public static bool CheckTelephone(string phone)
Parameters
| Type |
Name |
Description |
| System.String |
phone |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsLatinLetterOrDigit(Char)
Declaration
public static bool IsLatinLetterOrDigit(char c)
Parameters
| Type |
Name |
Description |
| System.Char |
c |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsValidEMailLocalPartChar(Char)
Declaration
public static bool IsValidEMailLocalPartChar(char c)
Parameters
| Type |
Name |
Description |
| System.Char |
c |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsValidScreenNameLetter(Char)
Declaration
public static bool IsValidScreenNameLetter(char c)
Parameters
| Type |
Name |
Description |
| System.Char |
c |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsValidScreenNameLetterOrDigit(Char)
Declaration
public static bool IsValidScreenNameLetterOrDigit(char c)
Parameters
| Type |
Name |
Description |
| System.Char |
c |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsValidScreenNameSeparator(Char)
Declaration
public static bool IsValidScreenNameSeparator(char c)
Parameters
| Type |
Name |
Description |
| System.Char |
c |
|
Returns
| Type |
Description |
| System.Boolean |
|
NormalizeUSPhone(String)
Normalizes US phone string so it looks like (999) 999-9999x9999.
Declaration
public static string NormalizeUSPhone(string value)
Parameters
| Type |
Name |
Description |
| System.String |
value |
|
Returns
| Type |
Description |
| System.String |
|
SQLSafeSubstitute(String, Char)
Allows only safe characters and digits replacing characters that may be used in SQL injection.
This method may be used to generate column names from entity IDs
Declaration
public static string SQLSafeSubstitute(string str, char subst = ' ')
Parameters
| Type |
Name |
Description |
| System.String |
str |
|
| System.Char |
subst |
|
Returns
| Type |
Description |
| System.String |
|