Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Book_categoryy book_categoryy = db.Book_categoryy.Find(id);

            db.Book_categoryy.Remove(book_categoryy);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "cat_id,cat_name,cat_status")] Book_categoryy book_categoryy)
 {
     if (ModelState.IsValid)
     {
         db.Entry(book_categoryy).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(book_categoryy));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "cat_id,cat_name,cat_status")] Book_categoryy book_categoryy)
        {
            if (ModelState.IsValid)
            {
                db.Book_categoryy.Add(book_categoryy);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(book_categoryy));
        }
Example #4
0
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Book_categoryy book_categoryy = db.Book_categoryy.Find(id);

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