ReplaceRestorStr替换还原类
一、类名Class
类名:PublicFunctions.ReplaceRestorStr
二、属性Properties
无
三、方法Methods
1、去除空格
函数:public static string Trim(string strobject)
返回: bool
2、替换特殊字符
函数:public static string Replace(object strobject)
返回: string
3、还原特殊字符
函数:public static string Restore(string str)
返回: string
4、替换BR
函数:public static string ReplaceBr(string str)
返回: string
5、还原BR
函数:public static string RestoreBr(string str)
返回: string
6、还原HTML标签
函数:public static string RestoreHTMLTag(string str)
返回: string
7、过滤所有的HTML标签
函数:public static string RemoveHTMLTag(string str)
返回: string
8、替换HTML的Br标签为WORD格式的BR
函数:public static string ReplaceBrToWordBr(string str)
返回: string
9、用正则表达式进行替换
函数:public static string ReplaceByRegex(string str, string pattern, string ReplaceValue)
返回: string
10、去除非法字符
函数:public static string RemoveSpecialCharacters(string input)
返回: string
11、ApplyVariablies应用变量
函数:public static string ApplyVariablies(Dictionary<string, string> dic, string content, bool RemoveUnDefinedVariable = true)
返回: string
12、将任意数据表的值由数据库中的对应关系转换成显示值(转换DataTable)
函数:public static void RestoreValueToDisplayTextFromDataBase(DBHelper.RawDBHelper.SqlDataFactory context, ref DataTable MyDataTable, string ColumnName, string DataBaseTableName, string DataBaseKeyColumnName, string DataBaseValueColumnName, bool FillNullDisplayValue = false)
返回: void
13、将任意数据表的值由数据库中的对应关系转换成显示值(转换单个值)
函数:public static string RestoreValueToDisplayTextFromDataBase(DBHelper.RawDBHelper.SqlDataFactory context, string Value, string DataBaseTableName, string DataBaseKeyColumnName, string DataBaseValueColumnName, bool FillNullDisplayValue = false)
返回: string
14、将任意数据表的值由数据库中的对应关系转换成显示值(转换list)
函数:public static Dictionary<string, string> RestoreValueToDisplayTextFromDataBase(DBHelper.RawDBHelper.SqlDataFactory context, List<string> ValueList, string DataBaseTableName, string DataBaseKeyColumnName, string DataBaseValueColumnName, bool FillNullDisplayValue = false)
返回: Dictionary<string, string>