public ActionResult DeleteConfirmed(int id) { etp_etapas etp_etapas = db.etp_etapas.Find(id); db.etp_etapas.Remove(etp_etapas); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "etp_codigo,etp_nombre,etp_orden,etp_descripciom,etp_objetivo,etp_usuario_creacion,etp_fecha_grabacion,pln_codigo,etp_fecha_inicio,etp_fecha_fin")] etp_etapas etp_etapas) { if (ModelState.IsValid) { db.Entry(etp_etapas).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.pln_codigo = new SelectList(db.pln_plan, "pln_codigo", "pln_nombre", etp_etapas.pln_codigo); return(View(etp_etapas)); }
public ActionResult Create([Bind(Include = "etp_codigo,etp_nombre,etp_orden,etp_descripciom,etp_objetivo,etp_usuario_creacion,etp_fecha_grabacion,pln_codigo,etp_fecha_inicio,etp_fecha_fin")] etp_etapas etp_etapas, int?main_id, bool?is_dependant) { if (ModelState.IsValid) { etp_etapas.etp_fecha_grabacion = DateTime.Today; db.etp_etapas.Add(etp_etapas); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.pln_codigo = new SelectList(db.pln_plan, "pln_codigo", "pln_nombre", etp_etapas.pln_codigo); return(View(etp_etapas)); }
// GET: etp_etapas/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } etp_etapas etp_etapas = db.etp_etapas.Find(id); if (etp_etapas == null) { return(HttpNotFound()); } return(View(etp_etapas)); }
// GET: etp_etapas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } etp_etapas etp_etapas = db.etp_etapas.Find(id); if (etp_etapas == null) { return(HttpNotFound()); } ViewBag.pln_codigo = new SelectList(db.pln_plan, "pln_codigo", "pln_nombre", etp_etapas.pln_codigo); return(View(etp_etapas)); }