public ActionResult DeleteConfirmed(int id)
        {
            poste poste = db.postes.Find(id);

            db.postes.Remove(poste);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Nom")] poste poste)
 {
     if (ModelState.IsValid)
     {
         db.Entry(poste).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(poste));
 }
        public ActionResult Create([Bind(Include = "Id,Nom")] poste poste)
        {
            if (ModelState.IsValid)
            {
                db.postes.Add(poste);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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