public ActionResult DeleteConfirmed(int id) { TIPOCORREO tIPOCORREO = db.TCorreos.Find(id); db.TCorreos.Remove(tIPOCORREO); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "TipoCorreoId,CorreoId,TipoCorreo1")] TIPOCORREO tIPOCORREO) { if (ModelState.IsValid) { db.Entry(tIPOCORREO).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CorreoId = new SelectList(db.Correos, "CorreoId", "Correo1", tIPOCORREO.CorreoId); return(View(tIPOCORREO)); }
public ActionResult Create([Bind(Include = "TipoCorreoId,CorreoId,TipoCorreo1")] TIPOCORREO tIPOCORREO) { if (ModelState.IsValid) { db.TCorreos.Add(tIPOCORREO); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CorreoId = new SelectList(db.Correos, "CorreoId", "Correo1", tIPOCORREO.CorreoId); return(View(tIPOCORREO)); }
// GET: TIPOCORREOs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TIPOCORREO tIPOCORREO = db.TCorreos.Find(id); if (tIPOCORREO == null) { return(HttpNotFound()); } return(View(tIPOCORREO)); }
// GET: TIPOCORREOs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TIPOCORREO tIPOCORREO = db.TCorreos.Find(id); if (tIPOCORREO == null) { return(HttpNotFound()); } ViewBag.CorreoId = new SelectList(db.Correos, "CorreoId", "Correo1", tIPOCORREO.CorreoId); return(View(tIPOCORREO)); }