Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            OrdiBureau ordiBureau = db.OrdiBureaux.Find(id);

            db.OrdiBureaux.Remove(ordiBureau);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,TypeCatego,Prix,Nom,Description,Memoire,Processeur,CarteGraphique")] OrdiBureau ordiBureau)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ordiBureau).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(ordiBureau));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "Id,TypeCatego,Prix,Nom,Description,Memoire,Processeur,CarteGraphique")] OrdiBureau ordiBureau)
        {
            if (ModelState.IsValid)
            {
                db.OrdiBureaux.Add(ordiBureau);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(ordiBureau));
        }
Пример #4
0
        // GET: OrdiBureaux/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OrdiBureau ordiBureau = db.OrdiBureaux.Find(id);

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