public ActionResult DeleteConfirmed(int id) { EntregasTareas entregasTareas = db.EntregasTareas.Find(id); db.EntregasTareas.Remove(entregasTareas); db.SaveChanges(); return RedirectToAction("Index"); }
public ActionResult Edit([Bind(Include = "idEntregasTarea,idTarea,idAlumno,tarea,fechaHoraEntrega,puntos")] EntregasTareas entregasTareas) { if (ModelState.IsValid) { db.Entry(entregasTareas).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.idAlumno = new SelectList(db.Alumnos, "idAlumno", "nombre", entregasTareas.idAlumno); ViewBag.idTarea = new SelectList(db.Tareas, "idTarea", "descripcionTarea", entregasTareas.idTarea); return View(entregasTareas); }
// GET: EntregasTareas/Delete/5 public ActionResult Delete(int? id) { if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } EntregasTareas entregasTareas = db.EntregasTareas.Find(id); if (entregasTareas == null) { return HttpNotFound(); } return View(entregasTareas); }
// GET: EntregasTareas/Edit/5 public ActionResult Edit(int? id) { if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } EntregasTareas entregasTareas = db.EntregasTareas.Find(id); if (entregasTareas == null) { return HttpNotFound(); } ViewBag.idAlumno = new SelectList(db.Alumnos, "idAlumno", "nombre", entregasTareas.idAlumno); ViewBag.idTarea = new SelectList(db.Tareas, "idTarea", "descripcionTarea", entregasTareas.idTarea); return View(entregasTareas); }