Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            LIRO lIRO = db.LIRO.Find(id);

            db.LIRO.Remove(lIRO);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "ID,NOMBRE,AUTOR,FECHA")] LIRO lIRO)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lIRO).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lIRO));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "ID,NOMBRE,AUTOR,FECHA")] LIRO lIRO)
        {
            if (ModelState.IsValid)
            {
                db.LIRO.Add(lIRO);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(lIRO));
        }
Esempio n. 4
0
        // GET: LIROes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LIRO lIRO = db.LIRO.Find(id);

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