Пример #1
0
 public void MatchesSearch(object obj = null) => Task.Factory.StartNew(() =>
 {
     MatchesResetInput();
     if (!String.IsNullOrEmpty(MatchesSearchText))
     {
         var searchList = MatchesSearchText.Split(' ');
         if (searchList.Count() > 0)
         {
             foreach (var item in searchList)
             {
                 if (!String.IsNullOrEmpty(item))
                 {
                     var text    = item?.ToUpper()?.Trim(' ') ?? "";
                     MatchesList = MatchesList.Where(
                         x => (x.Name?.ToUpper()?.Contains(text) ?? false) ||
                         (x.GoodId?.ToUpper()?.Contains(text) ?? false) ||
                         (x.CustomerGoodId?.ToUpper()?.Contains(text) ?? false) ||
                         (x.BarCode?.ToUpper()?.Contains(text) ?? false)
                         ).ToList();
                 }
             }
         }
     }
 });