public ActionResult UpdateFines()
        {
            Repo.UtilityFunctions uf = new Repo.UtilityFunctions();

            uf.UpdateFines();
            return(RedirectToAction("Index"));
        }
 public ActionResult Checkout(string cardid, string isbn)
 {
     Repo.UtilityFunctions uf = new Repo.UtilityFunctions();
     if (!uf.LoanBook(cardid, isbn))
     {
         return(RedirectToAction("Checkout", new { id = isbn, error = true }));
     }
     return(RedirectToAction("Index"));
 }
 public ActionResult Index(Borrower borrower)
 {
     Repo.UtilityFunctions uf = new Repo.UtilityFunctions();
     if (!uf.CreateBorrower(borrower))
     {
         ViewBag.Message = "Borrower with SSN : " + borrower.SSN + " already exists!";
     }
     return(View());
 }
        public ActionResult Checkout(string id, bool?error)
        {
            if (error != null)
            {
                if (error == true)
                {
                    ViewBag.Message = "The borrower already has checked out 3 book. Cannot checkout any more books!";
                }
            }

            Repo.UtilityFunctions uf   = new Repo.UtilityFunctions();
            BookSearch            book = uf.BookSearch(id).First();

            return(View(book));
        }
 public ActionResult Index(String text)
 {
     Repo.UtilityFunctions uf = new Repo.UtilityFunctions();
     return(View(uf.BookSearch(text)));
 }
 // GET: BookSearch
 public ActionResult Index()
 {
     Repo.UtilityFunctions uf = new Repo.UtilityFunctions();
     return(View(uf.BookSearch("")));
 }
 public ActionResult Checkin(string id)
 {
     Repo.UtilityFunctions uf = new Repo.UtilityFunctions();
     uf.Checkin(id);
     return(RedirectToAction("Index"));
 }
 public ActionResult Index()
 {
     Repo.UtilityFunctions uf = new Repo.UtilityFunctions();
     return(View(uf.GetBookLoans("")));
 }
 public ActionResult Pay(string id)
 {
     Repo.UtilityFunctions uf = new Repo.UtilityFunctions();
     uf.Pay(id);
     return(RedirectToAction("PayFine"));
 }
        public ActionResult PayFine()
        {
            Repo.UtilityFunctions uf = new Repo.UtilityFunctions();

            return(View(uf.GetAllFines()));
        }
        // GET: Fines
        public ActionResult Index()
        {
            Repo.UtilityFunctions uf = new Repo.UtilityFunctions();

            return(View(uf.GetFineDue()));
        }