public ActionResult Search(string Search, mvcTestingModel mvcModel, string Category)
 {
     mvcTestingDB mvcDB = new mvcTestingDB();
     if (Search == "Search1")
     {
         mvcModel.Category = mvcDB.getDropDownForSearch();
         mvcModel.SearchBooksList = mvcDB.SearchAllBooks(mvcModel.SearchBooks.BookNameInput, mvcModel.SearchBooks.BookISBNInput, mvcModel.SearchBooks.AuthorNameInput, Category);
     }
     else
     {
         ViewData["SearchLoginFailed"] = "false";
     }
     return View(mvcModel);
 }
 public ActionResult NewBook(mvcTestingModel mvcModel, CreateBook crt, string Category)
 {
     mvcTestingDB mvcDB = new mvcTestingDB();
     int result = 100;
     result = mvcDB.InsertSingleBookDetails(mvcModel.CreateBook.BookName, mvcModel.CreateBook.AuthorName, mvcModel.CreateBook.Publisher, Category, mvcModel.CreateBook.ISBN, mvcModel.CreateBook.PublishYear);
     mvcModel.Category = mvcDB.getDropDownForSearch();
     if (result == 0)
     {
         ViewData["success"] = "true";
         mvcModel.CreateBook.result = "Successfully, Book Deatails have been updated to the database.";
     }
     else
     {
         ViewData["success"] = "false";
     }
     return View(mvcModel);
 }
 public ActionResult Search()
 {
     mvcTestingDB mvcDB = new mvcTestingDB();
     mvcTestingModel mvcModel = new mvcTestingModel();
     mvcModel.Category = mvcDB.getDropDownForSearch();
     return View(mvcModel);
 }
 public ActionResult NewBook()
 {
     if (Session["Adminlogin"] != null)
     {
         mvcTestingDB mvcDB = new mvcTestingDB();
         mvcTestingModel mvcModel = new mvcTestingModel();
         mvcModel.Category = mvcDB.getDropDownForSearch();
         return View(mvcModel);
     }
     else
     {
         return RedirectToAction("ErrorPage");
     }
 }