예제 #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);
 }