Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SieveModel Submodule Test
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nguyenvu
SieveModel Submodule Test
Commits
c24ead45
Commit
c24ead45
authored
Mar 20, 2021
by
VTHIEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed sieve
parent
f7b6a462
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
RemoveVietNamSign.cs
Sieve/Models/RemoveVietNamSign.cs
+2
-2
SieveProcessor.cs
Sieve/Services/SieveProcessor.cs
+8
-8
No files found.
Sieve/Models/RemoveVietNamSign.cs
View file @
c24ead45
...
@@ -39,7 +39,7 @@ namespace Sieve.Models
...
@@ -39,7 +39,7 @@ namespace Sieve.Models
"ÝỲỴỶỸ"
"ÝỲỴỶỸ"
};
};
public
string
RemoveSignVietnameseString
(
string
str
)
public
string
RemoveSign
AndUpper
VietnameseString
(
string
str
)
{
{
if
(
str
==
null
)
if
(
str
==
null
)
{
{
...
@@ -50,7 +50,7 @@ namespace Sieve.Models
...
@@ -50,7 +50,7 @@ namespace Sieve.Models
for
(
int
j
=
0
;
j
<
VietnameseSigns
[
i
].
Length
;
j
++)
for
(
int
j
=
0
;
j
<
VietnameseSigns
[
i
].
Length
;
j
++)
str
=
str
.
Replace
(
VietnameseSigns
[
i
][
j
],
VietnameseSigns
[
0
][
i
-
1
]);
str
=
str
.
Replace
(
VietnameseSigns
[
i
][
j
],
VietnameseSigns
[
0
][
i
-
1
]);
}
}
return
str
;
return
str
.
ToUpper
()
;
}
}
}
}
}
}
Sieve/Services/SieveProcessor.cs
View file @
c24ead45
...
@@ -421,7 +421,7 @@ namespace Sieve.Services
...
@@ -421,7 +421,7 @@ namespace Sieve.Services
foreach
(
var
filterTermValue1
in
filterTerm
.
Values
)
foreach
(
var
filterTermValue1
in
filterTerm
.
Values
)
{
{
var
filterTermValue
=
(
new
RemoveVietNamSign
()).
RemoveSignVietnameseString
(
filterTermValue1
);
var
filterTermValue
=
(
new
RemoveVietNamSign
()).
RemoveSign
AndUpper
VietnameseString
(
filterTermValue1
);
//string filterTermValue = this.RemoveSign4VietnameseString(filterTermValue1); //Added by thien to emove vietnam
//string filterTermValue = this.RemoveSign4VietnameseString(filterTermValue1); //Added by thien to emove vietnam
dynamic
constantVal
=
converter
.
CanConvertFrom
(
typeof
(
string
))
dynamic
constantVal
=
converter
.
CanConvertFrom
(
typeof
(
string
))
...
@@ -435,12 +435,12 @@ namespace Sieve.Services
...
@@ -435,12 +435,12 @@ namespace Sieve.Services
{
{
//if (property.PropertyType.Name.ToLower().Equals("string"))
//if (property.PropertyType.Name.ToLower().Equals("string"))
//{
//{
var
upperData
=
Expression
.
Call
(
propertyValue
,
typeof
(
string
).
GetMethods
()
//
var upperData = Expression.Call(propertyValue,typeof(string).GetMethods()
.
First
(
m
=>
m
.
Name
==
"ToUpper"
&&
m
.
GetParameters
().
Length
==
0
));
//
.First(m => m.Name == "ToUpper" && m.GetParameters().Length == 0));
propertyValue
=
Expression
.
Call
(
propertyValue
=
Expression
.
Call
(
Expression
.
New
(
typeof
(
RemoveVietNamSign
)),
Expression
.
New
(
typeof
(
RemoveVietNamSign
)),
typeof
(
RemoveVietNamSign
).
GetMethod
(
"RemoveSignVietnameseString"
,
new
Type
[]
{
typeof
(
string
)
}),
typeof
(
RemoveVietNamSign
).
GetMethod
(
"RemoveSign
AndUpper
VietnameseString"
,
new
Type
[]
{
typeof
(
string
)
}),
upperData
propertyValue
);
);
/*}else
/*}else
{
{
...
@@ -453,9 +453,9 @@ namespace Sieve.Services
...
@@ -453,9 +453,9 @@ namespace Sieve.Services
/**/
/**/
filterValue
=
Expression
.
Call
(
filterValue
,
//
filterValue = Expression.Call(filterValue,
typeof
(
string
).
GetMethods
()
//
typeof(string).GetMethods()
.
First
(
m
=>
m
.
Name
==
"ToUpper"
&&
m
.
GetParameters
().
Length
==
0
));
//
.First(m => m.Name == "ToUpper" && m.GetParameters().Length == 0));
}
}
var
expression
=
GetExpression
(
filterTerm
,
filterValue
,
propertyValue
,
bCaseSensitive
);
var
expression
=
GetExpression
(
filterTerm
,
filterValue
,
propertyValue
,
bCaseSensitive
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment