Development

This commit is contained in:
2026-07-21 11:33:58 -04:00
parent 7a3a07b0da
commit ba5aee6640
2 changed files with 148 additions and 129 deletions
@@ -7279,9 +7279,33 @@ namespace VEPROMS.CSLA.Library
_ByWordSuffix = byWordSuffix;
}
}
private string checkPercentChar(string SearchString)
{
string ss = "";
string pattern = "%"; // Pattern to match the percentage sign
Match match = Regex.Match(SearchString, pattern);
if (match.Success)
{
int sl = SearchString.Length;
int precentIdx = SearchString.IndexOf('%');
int startIndex = 0;
if (sl == precentIdx + 1) // % the last char.
{
ss = SearchString.Substring(startIndex, sl - 1);
var isNumeric = int.TryParse(ss, out int n);
if (isNumeric == true) // other that a % are the rest of the characters numbers.
{
ss = ' ' + SearchString; //add a space prefix;
}
}
}
return ss;
}
private void DataPortal_Fetch(ItemListSearchCriteria criteria)
{
this.RaiseListChangedEvents = false;
//criteria.SearchString = checkPercentChar(criteria.SearchString);
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)