Ejemplo n.º 1
0
        public ActionResult AuthorBooks(string id)
        {
            // Initiate a class instance
            Authors author = new Authors();

            // Get author's books
            var authorBooks = new List<Tuple<string, string, string, string>>();
            authorBooks = author.GetAuthorBooks(id);

            Books book = new Books();
            string authorName;
            authorName = book.GetNameAuthor(id);

            ViewBag.AuthorBooks = authorBooks;
            ViewBag.AuthorName = authorName;

            return View();
        }
Ejemplo n.º 2
0
        public ActionResult Book(string id)
        {
            // Initiate a class instance
            Books book = new Books();

            // Get the book's data
            var dataBook = new List<Tuple<string, string, string, string, string>>();
            dataBook = book.GetBookById(id);

            string title = book.GetBookTitle(id);

            string author = book.GetNameAuthor(id);

            ViewBag.DataBook = dataBook;
            ViewBag.Title = title;
            ViewBag.Author = author;
            ViewBag.BookObject = book;

            return View();
        }