Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PAQUETE pAQUETE = db.PAQUETES.Find(id);

            db.PAQUETES.Remove(pAQUETE);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "id,nombre,descripcion,estado")] PAQUETE pAQUETE)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pAQUETE).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(pAQUETE));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "id,nombre,descripcion,estado")] PAQUETE pAQUETE)
        {
            if (ModelState.IsValid)
            {
                db.PAQUETES.Add(pAQUETE);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(pAQUETE));
        }
Example #4
0
        // GET: Paquetes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PAQUETE pAQUETE = db.PAQUETES.Find(id);

            if (pAQUETE == null)
            {
                return(HttpNotFound());
            }
            return(View(pAQUETE));
        }
Example #5
0
 public void update(PAQUETE obj)
 {
     throw new NotImplementedException();
 }