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")); }
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)); }
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)); }
// 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)); }