示例#1
0
        public ActionResult DeleteConfirmed(string id)
        {
            SPA_Servicios sPA_Servicios = db.SPA_Servicios.Find(id);

            db.SPA_Servicios.Remove(sPA_Servicios);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "CodSer,NomSer,DesSer,DurSer,PreSer")] SPA_Servicios sPA_Servicios)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sPA_Servicios).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(sPA_Servicios));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "CodSer,NomSer,DesSer,DurSer,PreSer")] SPA_Servicios sPA_Servicios)
        {
            if (ModelState.IsValid)
            {
                db.SPA_Servicios.Add(sPA_Servicios);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(sPA_Servicios));
        }
示例#4
0
        // GET: SPA_Servicios/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SPA_Servicios sPA_Servicios = db.SPA_Servicios.Find(id);

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