Commit c24ead45 authored by VTHIEN's avatar VTHIEN

fixed sieve

parent f7b6a462
......@@ -39,7 +39,7 @@ namespace Sieve.Models
"ÝỲỴỶỸ"
};
public string RemoveSignVietnameseString(string str)
public string RemoveSignAndUpperVietnameseString(string str)
{
if (str==null)
{
......@@ -50,7 +50,7 @@ namespace Sieve.Models
for (int j = 0; j < VietnameseSigns[i].Length; j++)
str = str.Replace(VietnameseSigns[i][j], VietnameseSigns[0][i - 1]);
}
return str;
return str.ToUpper();
}
}
}
......@@ -421,7 +421,7 @@ namespace Sieve.Services
foreach (var filterTermValue1 in filterTerm.Values)
{
var filterTermValue = (new RemoveVietNamSign()).RemoveSignVietnameseString(filterTermValue1);
var filterTermValue = (new RemoveVietNamSign()).RemoveSignAndUpperVietnameseString(filterTermValue1);
//string filterTermValue = this.RemoveSign4VietnameseString(filterTermValue1); //Added by thien to emove vietnam
dynamic constantVal = converter.CanConvertFrom(typeof(string))
......@@ -435,12 +435,12 @@ namespace Sieve.Services
{
//if (property.PropertyType.Name.ToLower().Equals("string"))
//{
var upperData = Expression.Call(propertyValue,typeof(string).GetMethods()
.First(m => m.Name == "ToUpper" && m.GetParameters().Length == 0));
//var upperData = Expression.Call(propertyValue,typeof(string).GetMethods()
// .First(m => m.Name == "ToUpper" && m.GetParameters().Length == 0));
propertyValue = Expression.Call(
Expression.New(typeof(RemoveVietNamSign)),
typeof(RemoveVietNamSign).GetMethod("RemoveSignVietnameseString", new Type[] { typeof(string) }),
upperData
typeof(RemoveVietNamSign).GetMethod("RemoveSignAndUpperVietnameseString", new Type[] { typeof(string) }),
propertyValue
);
/*}else
{
......@@ -453,9 +453,9 @@ namespace Sieve.Services
/**/
filterValue = Expression.Call(filterValue,
typeof(string).GetMethods()
.First(m => m.Name == "ToUpper" && m.GetParameters().Length == 0));
//filterValue = Expression.Call(filterValue,
// typeof(string).GetMethods()
// .First(m => m.Name == "ToUpper" && m.GetParameters().Length == 0));
}
var expression = GetExpression(filterTerm, filterValue, propertyValue, bCaseSensitive);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment