示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ProductieStatus productieStatusModel = db.ProductieStatus.Find(id);

            db.ProductieStatus.Remove(productieStatusModel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,Naam")] ProductieStatus productieStatusModel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(productieStatusModel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(productieStatusModel));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "Id,Naam")] ProductieStatus productieStatusModel)
        {
            if (ModelState.IsValid)
            {
                db.ProductieStatus.Add(productieStatusModel);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(productieStatusModel));
        }
示例#4
0
        // GET: ProductieStatus/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProductieStatus productieStatusModel = db.ProductieStatus.Find(id);

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