public ActionResult ListBook()
 {
     if (Session["UserName"] != null && (int)Session["Role"] == 1)
     {
         ViewBag.ListBook = BookAction.ListBook();
         //AccountAction.
         return(View());
     }
     return(RedirectToAction("Login", "Account"));
 }
Пример #2
0
        public ActionResult Add()
        {
            Book book = new Book
            {
                AuthorCollection   = AuthorAction.ListAuthor(),
                BookTypeCollection = BookAction.ListBookType()
            };

            ViewBag.ListBook = BookAction.ListBook();
            return(View(book));
        }
Пример #3
0
        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());
        }
Пример #4
0
 public ActionResult HomePage()
 {
     ViewBag.ListBook = BookAction.ListBook();
     return(View());
 }
Пример #5
0
 public ActionResult ShopGrid()
 {
     ViewBag.ListBook = BookAction.ListBook();
     return(View());
 }
 public ActionResult ListBook()
 {
     ViewBag.ListBook = BookAction.ListBook();
     //AccountAction.
     return(View());
 }