public ActionResult DeleteConfirmed(int id) { CatCorreo catCorreo = db.CatCorreos.Find(id); db.CatCorreos.Remove(catCorreo); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IDCorreo,Correo,Estado")] CatCorreo catCorreo) { if (ModelState.IsValid) { db.Entry(catCorreo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(catCorreo)); }
public ActionResult Create([Bind(Include = "IDCorreo,Correo,Estado")] CatCorreo catCorreo) { if (ModelState.IsValid) { db.CatCorreos.Add(catCorreo); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(catCorreo)); }
// GET: CatCorreos/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CatCorreo catCorreo = db.CatCorreos.Find(id); if (catCorreo == null) { return(HttpNotFound()); } return(View(catCorreo)); }