public ActionResult DeleteConfirmed(decimal id) { SERVICIO_EMPRESA sERVICIO_EMPRESA = db.SERVICIO_EMPRESA.Find(id); db.SERVICIO_EMPRESA.Remove(sERVICIO_EMPRESA); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID_SERV,ID_EMPRESA,ID_SERVI_EMP")] SERVICIO_EMPRESA sERVICIO_EMPRESA) { if (ModelState.IsValid) { db.Entry(sERVICIO_EMPRESA).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID_EMPRESA = new SelectList(db.EMPRESA_CLI, "ID_EMPRESA", "RUT_EMPRESA_PROV", sERVICIO_EMPRESA.ID_EMPRESA); ViewBag.ID_SERV = new SelectList(db.SERVICIO, "ID_SERV", "RUT_EMPRESA_PROV", sERVICIO_EMPRESA.ID_SERV); return(View(sERVICIO_EMPRESA)); }
// GET: SERVICIO_EMPRESA/Details/5 public ActionResult Details(decimal id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SERVICIO_EMPRESA sERVICIO_EMPRESA = db.SERVICIO_EMPRESA.Find(id); if (sERVICIO_EMPRESA == null) { return(HttpNotFound()); } return(View(sERVICIO_EMPRESA)); }
// GET: SERVICIO_EMPRESA/Edit/5 public ActionResult Edit(decimal id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SERVICIO_EMPRESA sERVICIO_EMPRESA = db.SERVICIO_EMPRESA.Find(id); if (sERVICIO_EMPRESA == null) { return(HttpNotFound()); } ViewBag.ID_EMPRESA = new SelectList(db.EMPRESA_CLI, "ID_EMPRESA", "RUT_EMPRESA_PROV", sERVICIO_EMPRESA.ID_EMPRESA); ViewBag.ID_SERV = new SelectList(db.SERVICIO, "ID_SERV", "RUT_EMPRESA_PROV", sERVICIO_EMPRESA.ID_SERV); return(View(sERVICIO_EMPRESA)); }