示例#1
0
 // Kiểm tra 1 sách nằm trong bộ lọc (category) hiện tại hay không
 // Chỉ cần 1 trong các category của sách đó nằm trong category hiện tại
 public bool inCategory(listBookItem book)
 {
     foreach (string c in book.category.ToLower().Split(';'))
     {
         if (checkedCategoryList.Any(checkedVal => checkedVal == c))
         {
             return(true);
         }
     }
     return(false);
 }
示例#2
0
        private bool inBookContent(string str, listBookItem book)
        {
            if (book.bookName.ToLower().IndexOf(str.ToLower()) != -1)
            {
                return(true);
            }
            if (book.description != null)
            {
                if (book.description.ToLower().IndexOf(str.ToLower()) != -1)
                {
                    return(true);
                }
            }

            /*if (book.extraSearch!=null)
             *  if (book.extraSearch.ToLower().IndexOf(str.ToLower()) != -1) return true;*/

            return(false);
        }