public async Task <ActionResult> DeleteConfirmed(int id) { Admitido admitido = await db.Admitidos.FindAsync(id); db.Admitidos.Remove(admitido); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "Id,ID_IES,NOMBRE_IES,ANO,SEMESTRE,COD_DANE,DEPARTAMENTO,MUNICIPIO,PRO_CONSECUTIVO,PROGRAMA,TIPO_DOCUMENTO,NUMERO_DOCUMENTO")] Admitido admitido) { if (ModelState.IsValid) { db.Entry(admitido).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(admitido)); }
// GET: Admitido/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Admitido admitido = await db.Admitidos.FindAsync(id); if (admitido == null) { return(HttpNotFound()); } return(View(admitido)); }