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

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

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

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