public async Task <ActionResult> DeleteConfirmed(long id) { Plantilla_Correo plantilla_Correo = await db.Plantilla_Correo.FindAsync(id); db.Plantilla_Correo.Remove(plantilla_Correo); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "plantilla_correo_id,nombre,descripcion,asunto,cuerpo,FK_plantillas_correo_estado_rips,fecha_modificacion")] Plantilla_Correo plantilla_Correo) { if (ModelState.IsValid) { db.Entry(plantilla_Correo).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.FK_plantillas_correo_estado_rips = new SelectList(db.Estado_RIPS, "estado_rips_id", "tipo", plantilla_Correo.FK_plantillas_correo_estado_rips); return(View(plantilla_Correo)); }
// GET: Plantilla_Correo/Details/5 public async Task <ActionResult> Details(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Plantilla_Correo plantilla_Correo = await db.Plantilla_Correo.FindAsync(id); if (plantilla_Correo == null) { return(HttpNotFound()); } return(View(plantilla_Correo)); }
// GET: Plantilla_Correo/Edit/5 public async Task <ActionResult> Edit(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Plantilla_Correo plantilla_Correo = await db.Plantilla_Correo.FindAsync(id); if (plantilla_Correo == null) { return(HttpNotFound()); } ViewBag.FK_plantillas_correo_estado_rips = new SelectList(db.Estado_RIPS, "estado_rips_id", "tipo", plantilla_Correo.FK_plantillas_correo_estado_rips); return(View(plantilla_Correo)); }