Пример #1
0
 public ActionResult Index(vmTextbookSearch vm)
 {
     using (TBManager)
     {
         var books = TBManager.GetAllTextbookDetails();
         if (!string.IsNullOrEmpty(vm.SearchText))
         {
             books = books.Where(b => (b.ISBNNumber == vm.SearchText) || (b.Name.Contains(vm.SearchText)) || (b.AuthorName.Contains(vm.SearchText)));
         }
         JsonResult result = Json(books.ToList());
         return result;
     }
 }
Пример #2
0
 public ActionResult Index()
 {
     var disp = new vmTextbookSearch();
     return View(disp);
 }