fitframework
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
IS.Comm.CommonLib Class Reference

Những hàm tiện ích thực hiện các thao tác kiểm tra, chuyển đổi, sẽ được thừa kế bỏi lớp localcommonlib. Những thao tác kiểm tra kiểu dữ liệu, chuyển đổi dữ liệu, thực hiện lấy dữ liệu từ các hàng dữ liệu đều phải được thực hiện qua lớp này Các hàm 2string để chuyển đổi sang string từ các đối tượng Các hàm convert2 để thực hiện chuyển đổi dữ liệu từ string sang các định kiểu Các hàm check* để kiểm tra dữ liệu Các hàm *4Row thực hiện xuất dữ liệu từ các hàng (datarow) ra các kiểu tương ứng. More...

Public Member Functions

 CommonLib ()
 Khởi tạo.
 
int compressFile (string sourceFile, string destinationFile)
 try to compress file
 
int decompressFile (string sourceFile, string destinationFile)
 Try to decompress.
 
int compressFile (DataSet ds, string filename, string key)
 write dataset to compress file
 
int compressFile (DataSet ds, FileStream w, string key)
 Compress and write the streaam from the data set.
 
int decompressFile (ref DataSet ds, string sourceFile, string key)
 read xml file to dataset
 
int decompressFile (ref DataSet ds, FileStream re, string key)
 Read from filestream to dataset.
 
int checkDate (string sd)
 Kiểm tra ô nhập vào là ngày tháng hay không,.
 
int checkTime (string sd)
 Kiểm tra giá trị nhập vào có là thời gian hay không.
 
int checkDatetime (string sd)
 Kiểm tra xem đúng ngày giờ phút.
 
int checkInt (string n)
 Kiểm tra xem là số nguyên.
 
int checkDecimal (string n)
 Kiểm tra xem là kiểu decimal; 0 is ok.
 
object getDate4Text (string sd, object def)
 Lấy giá trị date từ ô text, nếu không đúng sẽ nhận giá trị là def.
 
DateTime date4Text (string sd, DateTime def)
 Try to get date from text, if is not date format return default, assign min value based on minDate()
 
int convert2Int (string n, int def)
 Chuyển đổi chuỗi sang số nguyên.
 
bool convert2bool (string n, bool def)
 Convert string to bool value.
 
DateTime convert2datetime (string sd)
 Chuyển chuỗi định dạng sang ngày tháng giờ phút {dd/MM/yyyy HH:mm}.
 
DateTime convert2date (string sd)
 Chuyển từ chuỗi sang ngày tháng, nếu không đúng sẽ chọn là ngày tháng hiện tại {dd/MM/yyyy}.
 
DateTime convert2date (string sd, DateTime def)
 Chuyển từ chuỗi sang ngày tháng, nếu không đúng sẽ chọn là ngày tháng hiện tại {dd/MM/yyyy}.
 
decimal convert2Decimal (string n, decimal def)
 Chuyển sang kiểu decimal với giá trị mặc định là def.
 
double convert2Double (string n, double def)
 Chuyển sang kiểu double với mặc định là def.
 
string formatNumber (int n)
 Chuyển định dạng số nguyên.
 
string formatNumber (decimal n, int decimalcount=-1)
 Chuyển định dạng số thập phân.
 
string int2StringBlank (int v)
 convert int to string value, in case the value is 0 return blank
 
string int2StringBlankSep (int v)
 Chuyển sang có dấu phân cách.
 
string double2StringBlank (double v, int decimalcount=2)
 Chuyển đổi số kiểu double sang chuỗi, trong trường hợp bằng 0 thì chuyển sang dấu trắng.
 
string double2StringBlankSep (double v, int decimalcount=2)
 Chuyển đổi số kiểu double sang chuỗi, trong trường hợp bằng 0 thì chuyển sang dấu trắng có dấu phân cách.
 
string decimal2String (decimal v, int decimalcount=2)
 Try to convert a decimal value to string.
 
string decimal2StringBlank (decimal v, int decimalcount=2)
 Try to convert a decimal value to a string, if the value is zero, it will return a blank string.
 
string date2String (DateTime dt)
 Chuyển từ ngày tháng năm sang định dạng ngày tháng của hệ thống.
 
string date2string (DateTime dt, DateTime minlevel)
 if datetime is less than minlevel then is considered as null
 
string date2string (DateTime dt, DateTime minlevel, string format)
 if datetime is less than minlevel then is considered as null
 
string getShow (string data)
 Chuyển đổi ký tự xuống dòng sang định dạng xuống dòng của html.
 
int deleteFile (string fileName)
 Try to delete file from file system.
 
string checkFileName (string path, string filename)
 Kiểm tra tên file trong đường dẫn, nếu tồn tại sẽ tự động thêm các số 01, ... vào sau để không bị trùng lặp.
Sử dụng để ghi các file từ lient upload lên.
 
string repalce (string s, params string[] para)
 Thay thế chuỗi được định nghĩa trước bằng giá trị kế tiếp trong chuỗi, dùng cho các định nghĩa hiển thị trong hệ thống có định dạng.
 
string replaceIf (string s, params string[] key)
 replace the pattern (pa) with value (v) with the bound is {} or not
 
string checkLink (string serverPath, string link)
 Kiểm tra link có tồn tại, nếu là ra ngoài thì để nguyên, nếu là nội bộ kiểm tra xem sự tồn tại file (dành cho việc download các file, tránh báo lỗi file không tồn tại)
 
DateTime minDate ()
 Giá trị ngày tháng bé nhất có thể đưa vào cơ sở dữ liệu không bị lỗi.
 
int int4Row (DataRow dr, string columName, int defaultValue)
 Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định.
 
double double4Row (DataRow dr, string columName, double defaultValue)
 Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định.
 
decimal decimal4Row (DataRow dr, string columName, decimal defaultValue)
 Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định.
 
bool bool4Row (DataRow dr, string columName, bool defaultValue)
 Get bool value from a row column.
 
DateTime datetime4Row (DataRow dr, string columName, DateTime defaultValue)
 Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định.
 
int bit4Row (DataRow dr, string columName, int defaultValue)
 Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định.
 
string string4Row (DataRow dr, string columName, string defaultValue)
 
string stringNumber4Row (DataRow dr, string columName, string format, string defaultValue)
 convert to string with format predefined
 
string readMoney (long SoTien, string strTail)
 Đọc tiền thành chữ
 
bool isInt (string s, int low, int high)
 Kiểm tra xem kiểu là số nguyên trong giới hạn không.
 
bool isIP (string IP)
 Kiểm tra định dạng Ip bản 4.
 
int parseName (string fullname, out string familyName, out string firstname)
 Chuyển tên thành các thành phần.
 
string sortName (string fullname)
 Convert vietnamese's name to sortable name.
 
string Combin2PredefineUnicode (string source)
 Chuyển unicode tổ hợp sang unicode dựng sẵn.
 
string Predefine2sorttype (string source)
 Convert to sort type; Case sensitive.
 
string UnicodeName2SorttypeName (string thename)
 Convert from vietnameses language name to sort type code and convert to the sort name order Nguyễn Lan Anh -> Anh Nguyễn Lan, then convert to A0nh nguy0e7n La0n.
 
string unicode2None (string st)
 Chuyển từ unicode dựng sẵn sang không dấu.
 

Static Public Member Functions

static string StripHTML (string str)
 Loại bỏ các thẻ html tránh các tấn công XSS.
 
static string Substring (string stringIn, int count)
 Lấy một đoạn của chuỗi, nếu quá dài sẽ cắt ngắn và thêm dấu ...
 
static string bodau (string input)
 Chuyển đổi tiếng việt thành tiếng việt không dấu.
 
static string genFileName ()
 Sinh ra tên file dựa theo chỉ số ngày tháng năm sẽ có dạng yyyy_MM_dd_HH_mm_ss.
 
static string showMessage (string message)
 Đưa ra thông điệp cho client.
 

Detailed Description

Những hàm tiện ích thực hiện các thao tác kiểm tra, chuyển đổi, sẽ được thừa kế bỏi lớp localcommonlib. Những thao tác kiểm tra kiểu dữ liệu, chuyển đổi dữ liệu, thực hiện lấy dữ liệu từ các hàng dữ liệu đều phải được thực hiện qua lớp này Các hàm 2string để chuyển đổi sang string từ các đối tượng Các hàm convert2 để thực hiện chuyển đổi dữ liệu từ string sang các định kiểu Các hàm check* để kiểm tra dữ liệu Các hàm *4Row thực hiện xuất dữ liệu từ các hàng (datarow) ra các kiểu tương ứng.

Member Function Documentation

◆ bit4Row()

int IS.Comm.CommonLib.bit4Row ( DataRow dr,
string columName,
int defaultValue )
inline

Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định.

Parameters
drHàng cần lấy dữ liệu
columNameTên cột cần lấy dữ liệu
defaultValueGiá trị mặc định trong trường hợp là null, hoặc không chuyển đổi được
Returns
Giá trị trong hàng và cột

◆ bodau()

static string IS.Comm.CommonLib.bodau ( string input)
inlinestatic

Chuyển đổi tiếng việt thành tiếng việt không dấu.

Parameters
inputChuỗi tiếng Việt
Returns

◆ bool4Row()

bool IS.Comm.CommonLib.bool4Row ( DataRow dr,
string columName,
bool defaultValue )
inline

Get bool value from a row column.

Parameters
drRow to get value
columNameColumn to get value
defaultValueDefault value, in case error
Returns
bool value

◆ checkDate()

int IS.Comm.CommonLib.checkDate ( string sd)
inline

Kiểm tra ô nhập vào là ngày tháng hay không,.

Parameters
sdBiểu thức được coi là ngày tháng (các loại phân cách được áp dụng: /, - , ., : dấu cách)
Returns
0 là ngày thang, ngược lại là không đúng định dạng

◆ checkDatetime()

int IS.Comm.CommonLib.checkDatetime ( string sd)
inline

Kiểm tra xem đúng ngày giờ phút.

Parameters
sdChuỗi cần kiểm tra
Returns
0 thành công

◆ checkDecimal()

int IS.Comm.CommonLib.checkDecimal ( string n)
inline

Kiểm tra xem là kiểu decimal; 0 is ok.

Parameters
nCần kiểm tra
Returns
0 nếu là đúng

◆ checkFileName()

string IS.Comm.CommonLib.checkFileName ( string path,
string filename )
inline

Kiểm tra tên file trong đường dẫn, nếu tồn tại sẽ tự động thêm các số 01, ... vào sau để không bị trùng lặp.
Sử dụng để ghi các file từ lient upload lên.

Parameters
pathĐường dẫn; sử dụng Server.MapPath() + sub path
filenameTên file không bao gồm đường dẫn
Returns
Tên file không bao gồm đường dẫn

◆ checkInt()

int IS.Comm.CommonLib.checkInt ( string n)
inline

Kiểm tra xem là số nguyên.

Parameters
nCần kiểm tra
Returns
0 đúng là kiểu nguyên

◆ checkLink()

string IS.Comm.CommonLib.checkLink ( string serverPath,
string link )
inline

Kiểm tra link có tồn tại, nếu là ra ngoài thì để nguyên, nếu là nội bộ kiểm tra xem sự tồn tại file (dành cho việc download các file, tránh báo lỗi file không tồn tại)

Parameters
serverPath
link
Returns

◆ checkTime()

int IS.Comm.CommonLib.checkTime ( string sd)
inline

Kiểm tra giá trị nhập vào có là thời gian hay không.

Parameters
sdBiểu thức cần kiểm tra
Returns
0 nếu là đúng

◆ Combin2PredefineUnicode()

string IS.Comm.CommonLib.Combin2PredefineUnicode ( string source)
inline

Chuyển unicode tổ hợp sang unicode dựng sẵn.

Parameters
source
Returns

◆ compressFile() [1/3]

int IS.Comm.CommonLib.compressFile ( DataSet ds,
FileStream w,
string key )
inline

Compress and write the streaam from the data set.

Parameters
dsData
wOutput file stream
keyThe key for encrypting
Returns
0: is ok, -1: is error

◆ compressFile() [2/3]

int IS.Comm.CommonLib.compressFile ( DataSet ds,
string filename,
string key )
inline

write dataset to compress file

Parameters
dsThe dataset to be compressed
filenameThe file name will be written
keyThe key for encrypting
Returns
0: is ok; -1: is error

◆ compressFile() [3/3]

int IS.Comm.CommonLib.compressFile ( string sourceFile,
string destinationFile )
inline

try to compress file

Parameters
sourceFileFull path original source file name
destinationFileFull path compressed destination file name
Returns
0 ok, -1 is error

◆ convert2bool()

bool IS.Comm.CommonLib.convert2bool ( string n,
bool def )
inline

Convert string to bool value.

Parameters
nValue in string
defDefault value in case the conversion is error
Returns
The value

◆ convert2date() [1/2]

DateTime IS.Comm.CommonLib.convert2date ( string sd)
inline

Chuyển từ chuỗi sang ngày tháng, nếu không đúng sẽ chọn là ngày tháng hiện tại {dd/MM/yyyy}.

Parameters
sdChuỗi cần chuyển
Returns
Ngày tháng

◆ convert2date() [2/2]

DateTime IS.Comm.CommonLib.convert2date ( string sd,
DateTime def )
inline

Chuyển từ chuỗi sang ngày tháng, nếu không đúng sẽ chọn là ngày tháng hiện tại {dd/MM/yyyy}.

Parameters
sdChuỗi cần chuyển
defNgày tháng mặc định nếu không chuyển đổi được
Returns
Ngày tháng

◆ convert2datetime()

DateTime IS.Comm.CommonLib.convert2datetime ( string sd)
inline

Chuyển chuỗi định dạng sang ngày tháng giờ phút {dd/MM/yyyy HH:mm}.

Parameters
sdChuỗi định dạng
Returns
Giá trị nhập, nếu không mặc định tại thời điểm hiện tại

◆ convert2Decimal()

decimal IS.Comm.CommonLib.convert2Decimal ( string n,
decimal def )
inline

Chuyển sang kiểu decimal với giá trị mặc định là def.

Parameters
n
def
Returns

◆ convert2Double()

double IS.Comm.CommonLib.convert2Double ( string n,
double def )
inline

Chuyển sang kiểu double với mặc định là def.

Parameters
n
def
Returns

◆ convert2Int()

int IS.Comm.CommonLib.convert2Int ( string n,
int def )
inline

Chuyển đổi chuỗi sang số nguyên.

Parameters
nChuỗi cần chuyển
defGiá trị mặc định nếu chuyển sai
Returns
Giá trị chuyển đổi được

◆ date2String()

string IS.Comm.CommonLib.date2String ( DateTime dt)
inline

Chuyển từ ngày tháng năm sang định dạng ngày tháng của hệ thống.

Parameters
dtBiến kiểu ngày tháng cần chuyển
Returns

◆ date2string() [1/2]

string IS.Comm.CommonLib.date2string ( DateTime dt,
DateTime minlevel )
inline

if datetime is less than minlevel then is considered as null

Parameters
dt
minlevel
Returns

◆ date2string() [2/2]

string IS.Comm.CommonLib.date2string ( DateTime dt,
DateTime minlevel,
string format )
inline

if datetime is less than minlevel then is considered as null

Parameters
dt
minlevel
format
Returns

◆ date4Text()

DateTime IS.Comm.CommonLib.date4Text ( string sd,
DateTime def )
inline

Try to get date from text, if is not date format return default, assign min value based on minDate()

Parameters
sdDate string to convert
defDefault value
Returns
date

◆ datetime4Row()

DateTime IS.Comm.CommonLib.datetime4Row ( DataRow dr,
string columName,
DateTime defaultValue )
inline

Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định.

Parameters
drHàng cần lấy dữ liệu
columNameTên cột cần lấy dữ liệu
defaultValueGiá trị mặc định trong trường hợp là null, hoặc không chuyển đổi được
Returns
Giá trị trong hàng và cột

◆ decimal2String()

string IS.Comm.CommonLib.decimal2String ( decimal v,
int decimalcount = 2 )
inline

Try to convert a decimal value to string.

Parameters
v
decimalcount
Returns

◆ decimal2StringBlank()

string IS.Comm.CommonLib.decimal2StringBlank ( decimal v,
int decimalcount = 2 )
inline

Try to convert a decimal value to a string, if the value is zero, it will return a blank string.

Parameters
v
decimalcount
Returns

◆ decimal4Row()

decimal IS.Comm.CommonLib.decimal4Row ( DataRow dr,
string columName,
decimal defaultValue )
inline

Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định.

Parameters
drHàng cần lấy dữ liệu
columNameTên cột cần lấy dữ liệu
defaultValueGiá trị mặc định trong trường hợp là null, hoặc không chuyển đổi được
Returns
Giá trị trong hàng và cột

◆ decompressFile() [1/3]

int IS.Comm.CommonLib.decompressFile ( ref DataSet ds,
FileStream re,
string key )
inline

Read from filestream to dataset.

Parameters
dsTeh dataset to hold data
reThe input file stream
keyThe key for deencrypting
Returns
0: is ok, -1: is error

◆ decompressFile() [2/3]

int IS.Comm.CommonLib.decompressFile ( ref DataSet ds,
string sourceFile,
string key )
inline

read xml file to dataset

Parameters
dsThe dataset to hold the data
sourceFileThe source file
keyThe key for deencrypting
Returns
0: is ok, -1: is error

◆ decompressFile() [3/3]

int IS.Comm.CommonLib.decompressFile ( string sourceFile,
string destinationFile )
inline

Try to decompress.

Parameters
sourceFileFull path compressed source file name
destinationFileFull path decompressed destination file name
Returns
0: is ok, -1: error

◆ deleteFile()

int IS.Comm.CommonLib.deleteFile ( string fileName)
inline

Try to delete file from file system.

Parameters
fileName
Returns

◆ double2StringBlank()

string IS.Comm.CommonLib.double2StringBlank ( double v,
int decimalcount = 2 )
inline

Chuyển đổi số kiểu double sang chuỗi, trong trường hợp bằng 0 thì chuyển sang dấu trắng.

Parameters
v
Returns

◆ double2StringBlankSep()

string IS.Comm.CommonLib.double2StringBlankSep ( double v,
int decimalcount = 2 )
inline

Chuyển đổi số kiểu double sang chuỗi, trong trường hợp bằng 0 thì chuyển sang dấu trắng có dấu phân cách.

Parameters
v
decimalcount
Returns

◆ double4Row()

double IS.Comm.CommonLib.double4Row ( DataRow dr,
string columName,
double defaultValue )
inline

Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định.

Parameters
drHàng cần lấy dữ liệu
columNameTên cột cần lấy dữ liệu
defaultValueGiá trị mặc định trong trường hợp là null, hoặc không chuyển đổi được
Returns
Giá trị trong hàng và cột

◆ formatNumber() [1/2]

string IS.Comm.CommonLib.formatNumber ( decimal n,
int decimalcount = -1 )
inline

Chuyển định dạng số thập phân.

Parameters
n
Returns

◆ formatNumber() [2/2]

string IS.Comm.CommonLib.formatNumber ( int n)
inline

Chuyển định dạng số nguyên.

Parameters
n
Returns

◆ genFileName()

static string IS.Comm.CommonLib.genFileName ( )
inlinestatic

Sinh ra tên file dựa theo chỉ số ngày tháng năm sẽ có dạng yyyy_MM_dd_HH_mm_ss.

Returns

◆ getDate4Text()

object IS.Comm.CommonLib.getDate4Text ( string sd,
object def )
inline

Lấy giá trị date từ ô text, nếu không đúng sẽ nhận giá trị là def.

Parameters
sdChuỗi cần chuyển đổi sang ngày tháng
defGiá trị mặc định khi không đúng
Returns
Giá trị ngày tháng

◆ getShow()

string IS.Comm.CommonLib.getShow ( string data)
inline

Chuyển đổi ký tự xuống dòng sang định dạng xuống dòng của html.

Parameters
data
Returns

◆ int2StringBlank()

string IS.Comm.CommonLib.int2StringBlank ( int v)
inline

convert int to string value, in case the value is 0 return blank

Parameters
vvalue to that needs to be converted to string
Returns
string of number or blank

◆ int2StringBlankSep()

string IS.Comm.CommonLib.int2StringBlankSep ( int v)
inline

Chuyển sang có dấu phân cách.

Parameters
v
Returns

◆ int4Row()

int IS.Comm.CommonLib.int4Row ( DataRow dr,
string columName,
int defaultValue )
inline

Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định.

Parameters
drHàng cần lấy dữ liệu
columNameTên cột cần lấy dữ liệu
defaultValueGiá trị mặc định trong trường hợp là null, hoặc không chuyển đổi được
Returns
Giá trị trong hàng và cột

◆ isInt()

bool IS.Comm.CommonLib.isInt ( string s,
int low,
int high )
inline

Kiểm tra xem kiểu là số nguyên trong giới hạn không.

Parameters
sChuỗi dữ liệu
lowGiá trị thấp
highGiá trị cao
Returns

◆ isIP()

bool IS.Comm.CommonLib.isIP ( string IP)
inline

Kiểm tra định dạng Ip bản 4.

Parameters
IP
Returns

◆ minDate()

DateTime IS.Comm.CommonLib.minDate ( )
inline

Giá trị ngày tháng bé nhất có thể đưa vào cơ sở dữ liệu không bị lỗi.

Returns

◆ parseName()

int IS.Comm.CommonLib.parseName ( string fullname,
out string familyName,
out string firstname )
inline

Chuyển tên thành các thành phần.

Parameters
fullname
familyName
firstname
Returns

◆ Predefine2sorttype()

string IS.Comm.CommonLib.Predefine2sorttype ( string source)
inline

Convert to sort type; Case sensitive.

Parameters
source
Returns

◆ readMoney()

string IS.Comm.CommonLib.readMoney ( long SoTien,
string strTail )
inline

Đọc tiền thành chữ

Parameters
SoTienGiá trị cần đọc (là giá trị nguyên)
strTailThêm các đuôi (đồng)
Returns

◆ repalce()

string IS.Comm.CommonLib.repalce ( string s,
params string[] para )
inline

Thay thế chuỗi được định nghĩa trước bằng giá trị kế tiếp trong chuỗi, dùng cho các định nghĩa hiển thị trong hệ thống có định dạng.

Parameters
sChuỗi có các định dạng cần thay thế
paracác cặp liên tiếp sẽ thay thế cho nhau, giá trị sau thay thế cho giá trị đứng trước
Returns
Chuối sau khi đã thay thế

◆ replaceIf()

string IS.Comm.CommonLib.replaceIf ( string s,
params string[] key )
inline

replace the pattern (pa) with value (v) with the bound is {} or not

Parameters
s
pa
v
Returns

◆ showMessage()

static string IS.Comm.CommonLib.showMessage ( string message)
inlinestatic

Đưa ra thông điệp cho client.

Parameters
message
Returns

◆ sortName()

string IS.Comm.CommonLib.sortName ( string fullname)
inline

Convert vietnamese's name to sortable name.

Parameters
fullname
Returns

◆ string4Row()

string IS.Comm.CommonLib.string4Row ( DataRow dr,
string columName,
string defaultValue )
inline

Lấy dữ liệu từ trong một datarow, có kiểm tra null, sự tồn tại của trường, nếu null trả về giá trị mặc định

Parameters
drHàng cần lấy dữ liệu
columNameTên cột cần lấy dữ liệu
defaultValueGiá trị mặc định trong trường hợp là null, hoặc không chuyển đổi được
Returns
Giá trị trong hàng và cột

◆ stringNumber4Row()

string IS.Comm.CommonLib.stringNumber4Row ( DataRow dr,
string columName,
string format,
string defaultValue )
inline

convert to string with format predefined

Parameters
dr
columName
format
defaultValue
Returns

◆ StripHTML()

static string IS.Comm.CommonLib.StripHTML ( string str)
inlinestatic

Loại bỏ các thẻ html tránh các tấn công XSS.

Parameters
str
Returns

◆ Substring()

static string IS.Comm.CommonLib.Substring ( string stringIn,
int count )
inlinestatic

Lấy một đoạn của chuỗi, nếu quá dài sẽ cắt ngắn và thêm dấu ...

Parameters
stringInChuỗi cần cắt
countSố lượng từ
Returns

◆ unicode2None()

string IS.Comm.CommonLib.unicode2None ( string st)
inline

Chuyển từ unicode dựng sẵn sang không dấu.

Parameters
st
Returns

◆ UnicodeName2SorttypeName()

string IS.Comm.CommonLib.UnicodeName2SorttypeName ( string thename)
inline

Convert from vietnameses language name to sort type code and convert to the sort name order Nguyễn Lan Anh -> Anh Nguyễn Lan, then convert to A0nh nguy0e7n La0n.

Parameters
thename
Returns

The documentation for this class was generated from the following file: