Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DenominationEmploi denominationEmploi = db.DenominationEmploi.Find(id);

            db.DenominationEmploi.Remove(denominationEmploi);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "idDenom,denomination,idLangue")] DenominationEmploi denominationEmploi)
 {
     if (ModelState.IsValid)
     {
         db.Entry(denominationEmploi).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.idLangue = new SelectList(db.Langue, "idLangue", "libelle", denominationEmploi.idLangue);
     return(View(denominationEmploi));
 }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Include = "idDenom,denomination,idLangue")] DenominationEmploi denominationEmploi)
        {
            if (ModelState.IsValid)
            {
                db.DenominationEmploi.Add(denominationEmploi);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.idLangue = new SelectList(db.Langue, "idLangue", "libelle", denominationEmploi.idLangue);
            return(View(denominationEmploi));
        }
Ejemplo n.º 4
0
        // GET: DenominationEmplois/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DenominationEmploi denominationEmploi = db.DenominationEmploi.Find(id);

            if (denominationEmploi == null)
            {
                return(HttpNotFound());
            }
            return(View(denominationEmploi));
        }
Ejemplo n.º 5
0
        // GET: DenominationEmplois/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DenominationEmploi denominationEmploi = db.DenominationEmploi.Find(id);

            if (denominationEmploi == null)
            {
                return(HttpNotFound());
            }
            ViewBag.idLangue = new SelectList(db.Langue, "idLangue", "libelle", denominationEmploi.idLangue);
            return(View(denominationEmploi));
        }