public ActionResult ListBook() { if (Session["UserName"] != null && (int)Session["Role"] == 1) { ViewBag.ListBook = BookAction.ListBook(); //AccountAction. return(View()); } return(RedirectToAction("Login", "Account")); }
public ActionResult Add() { Book book = new Book { AuthorCollection = AuthorAction.ListAuthor(), BookTypeCollection = BookAction.ListBookType() }; ViewBag.ListBook = BookAction.ListBook(); return(View(book)); }
public ActionResult Detail(int ID) { Book book = BookAction.FindBook(ID); if (Session["UserName"] != null) { int id_account = (int)Session["UserID"]; BookAction.Watched(id_account, ID); } else { BookAction.Watched(null, ID); } ViewBag.Book = book; ViewBag.ListBook = BookAction.ListBook(); return(View()); }
public ActionResult HomePage() { ViewBag.ListBook = BookAction.ListBook(); return(View()); }
public ActionResult ShopGrid() { ViewBag.ListBook = BookAction.ListBook(); return(View()); }
public ActionResult ListBook() { ViewBag.ListBook = BookAction.ListBook(); //AccountAction. return(View()); }