Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            T_biere t_biere = db.T_biere.Find(id);

            db.T_biere.Remove(t_biere);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,Nom,Id_type")] T_biere t_biere)
 {
     if (ModelState.IsValid)
     {
         db.Entry(t_biere).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Id_type = new SelectList(db.T_type, "Id", "TypeBiere", t_biere.Id_type);
     return(View(t_biere));
 }
Exemplo n.º 3
0
        // GET: T_biere/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            T_biere t_biere = db.T_biere.Find(id);

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

            if (t_biere == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Id_type = new SelectList(db.T_type, "Id", "TypeBiere", t_biere.Id_type);
            return(View(t_biere));
        }