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

            db.vbas.Remove(vbas);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "id_vbas,label,poids,id_texture,id_couleur")] vbas vbas)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vbas).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.id_couleur = new SelectList(db.couleur, "id_couleur", "label", vbas.id_couleur);
     ViewBag.id_texture = new SelectList(db.texture, "id_texture", "label", vbas.id_texture);
     return(View(vbas));
 }
Ejemplo n.º 3
0
        // GET: Vbas/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            vbas vbas = db.vbas.Find(id);

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

            if (vbas == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id_couleur = new SelectList(db.couleur, "id_couleur", "label", vbas.id_couleur);
            ViewBag.id_texture = new SelectList(db.texture, "id_texture", "label", vbas.id_texture);
            return(View(vbas));
        }