public ActionResult DeleteConfirmed(int id) { RecursoCResidual recursoCResidual = db.RecursoCResidual.Find(id); db.RecursoCResidual.Remove(recursoCResidual); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdRecursoCResidual,IdConjunto,Anio,IdMes,AcPuertoPlata,AcSosua,AcMontellano,AcLaIsabela,AcAltamira,AcLuperon,AcLosHidalgos,AcGuananico,AcImbert")] RecursoCResidual recursoCResidual) { if (ModelState.IsValid) { db.Entry(recursoCResidual).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdConjunto = new SelectList(db.ConjuntodeDato, "IdConjunto", "NombreConjunto", recursoCResidual.IdConjunto); ViewBag.IdMes = new SelectList(db.Mes, "IdMes", "NombreMes", recursoCResidual.IdMes); return(View(recursoCResidual)); }
// GET: RecursoCResidual/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RecursoCResidual recursoCResidual = db.RecursoCResidual.Find(id); if (recursoCResidual == null) { return(HttpNotFound()); } return(View(recursoCResidual)); }
// GET: RecursoCResidual/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RecursoCResidual recursoCResidual = db.RecursoCResidual.Find(id); if (recursoCResidual == null) { return(HttpNotFound()); } ViewBag.IdConjunto = new SelectList(db.ConjuntodeDato, "IdConjunto", "NombreConjunto", recursoCResidual.IdConjunto); ViewBag.IdMes = new SelectList(db.Mes, "IdMes", "NombreMes", recursoCResidual.IdMes); return(View(recursoCResidual)); }