Exemplo n.º 1
0
        public ActionResult DeleteAuthorConfirmed(int id)
        {
            AuthorsTBL selectedAuthor = _context.AuthorsTBLs.Find(id);

            _context.AuthorsTBLs.Remove(selectedAuthor);
            _context.SaveChanges();
            return(RedirectToAction("AuthorList"));
        }
Exemplo n.º 2
0
        //-----------------------------New Quote Add Alert Page----------------------------

        public ActionResult NewAuthorSuccess(AuthorsTBL newAuthorObj)
        {
            ViewBag.AlertAuthorName = newAuthorObj.AuthorName;

            ViewBag.AlertImagePath = newAuthorObj.AuthorImage;

            return(View());
        }
Exemplo n.º 3
0
        //-----------------------------------------------------Delete Author--------------------------------

        // GET: Author/Delete
        public ActionResult DeleteAuthor(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AuthorsTBL selectedAuthor = _context.AuthorsTBLs.Find(id);

            if (selectedAuthor == null)
            {
                return(HttpNotFound());
            }
            return(View(selectedAuthor));
        }