Exemplo n.º 1
0
        public void setViewBagForBook(long?selectedCategoryID = null, long?selectedAuthorID = null, long?selectedPublisherID = null)
        {
            ViewBag.listImage = imgHelper.loadListImage();
            var categoryDAO  = new BookCategoryDAO();
            var authorDAO    = new AuthorDAO();
            var publisherDAO = new PublisherDAO();

            ViewBag.Category  = new SelectList(categoryDAO.getListCategory(), "ID", "Name");
            ViewBag.Authors   = new SelectList(authorDAO.getListAuthor(), "ID", "Name");
            ViewBag.Publisher = new SelectList(publisherDAO.getListPublisher(), "ID", "Name");
        }
Exemplo n.º 2
0
        public void setViewbagforPub()
        {
            PublisherDAO pub = new PublisherDAO();

            ViewBag.listPub = pub.getListPublisher();
        }