Example #1
0
 public AccountingView()
 {
     InitializeComponent();
     _libraryAccountingProxy = new LibraryAccountingProxy();
     _accountsProxy          = new AccountsProxy();
     _booksProxy             = new BooksProxy();
 }
        public ActionResult Index(string booktitle, string description, string publisher, string author, int page = 1)
        {
            var proxy = new BooksProxy();

            ViewBag.Title = "Published Book";

            if (!string.IsNullOrEmpty(booktitle))
            {
                ViewBag.BookTitle = booktitle;
            }
            if (!string.IsNullOrEmpty(publisher))
            {
                ViewBag.Publisher = publisher;
            }
            if (!string.IsNullOrEmpty(description))
            {
                ViewBag.Description = description;
            }
            if (!string.IsNullOrEmpty(author))
            {
                ViewBag.Author = author;
            }

            var items = proxy.GetFiltered(booktitle, description, publisher, author);

            return(View(new PagedList <Book>(items, page, 5)));
        }
Example #3
0
 public BooksView()
 {
     InitializeComponent();
     _booksProxy = new BooksProxy();
 }