public BookList GetBookList(BookListRequest bookListRequest) { BookList bookList; using (var dataAccess = new LibraryDataAccess()) { var dt = dataAccess.GetBookList(bookListRequest.BookName, bookListRequest.AuthorName, bookListRequest.CategoryName, bookListRequest.Order); bookList = new BookList(); bookList.AddData(dt); } return bookList; }
public ActionResult Index(string bookname, string author, string category, string order) { //BookListRequest bookListRequest = new BookListRequest(bookname, author, category, Convert.ToInt32(order)); BookListRequest bookListRequest = new BookListRequest(bookname, author, category, Convert.ToInt32(order)); LibraryBusinessRules businessRules = new LibraryBusinessRules(); BookList bookList = businessRules.GetBookList(bookListRequest); //ViewBag.Order = Convert.ToString(Convert.ToInt32(order), 2).PadLeft(3,'0'); //ViewBag.Order = order; if (bookList != null) { return PartialView("PartialViews/BookList", bookList); } return View(); }