public async Task <ActionResult> DeleteConfirmed(int id) { tipo_juzgado tipo_juzgado = await db.tipo_juzgado.FindAsync(id); db.tipo_juzgado.Remove(tipo_juzgado); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "id,tipo_j")] tipo_juzgado tipo_juzgado) { if (ModelState.IsValid) { db.Entry(tipo_juzgado).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(tipo_juzgado)); }
public async Task <ActionResult> Create([Bind(Include = "id,tipo_j")] tipo_juzgado tipo_juzgado) { if (ModelState.IsValid) { db.tipo_juzgado.Add(tipo_juzgado); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(tipo_juzgado)); }
// GET: tipo_juzgado/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tipo_juzgado tipo_juzgado = await db.tipo_juzgado.FindAsync(id); if (tipo_juzgado == null) { return(HttpNotFound()); } return(View(tipo_juzgado)); }