public ActionResult DeleteConfirmed(int id)
        {
            tblCategory tblCategory = db.tblCategories.Find(id);

            db.tblCategories.Remove(tblCategory);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit2([Bind(Include = "CategoryID,CategoryName,CategoryBeschrijving,Status,StatusBeschrijving")] tblCategory tblCategory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblCategory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tblCategory));
 }
        public ActionResult Create([Bind(Include = "CategoryID,CategoryName,CategoryBeschrijving")] tblCategory tblCategory)
        {
            tblCategory.Status = "Te Accorderen creatie";
            if (ModelState.IsValid)
            {
                db.tblCategories.Add(tblCategory);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tblCategory));
        }
        // GET: tblCategories/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tblCategory tblCategory = db.tblCategories.Find(id);

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