Example #1
0
 public ActionResult DeleteConfirmed(int id)
 {
     EntregasTareas entregasTareas = db.EntregasTareas.Find(id);
     db.EntregasTareas.Remove(entregasTareas);
     db.SaveChanges();
     return RedirectToAction("Index");
 }
Example #2
0
 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);
 }
Example #3
0
 // 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);
 }
Example #4
0
 // 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);
 }