public ActionResult DeleteConfirmed(int id) { CLASES cLASES = db.CLASES.Find(id); db.CLASES.Remove(cLASES); db.SaveChanges(); return(RedirectToAction("Index")); }
public Clases(CLASES clase) { _idClase = clase.ID; _asignatura = new Asignatura(); _asignatura.IdAsignatura = clase.ID_ASIGNATURA; TimeSpan ts = clase.HORA.Value; FechaCompleta = clase.FECHA + ts; }
public ActionResult Edit([Bind(Include = "ID,ID_PROFESOR,ID_MATERIA,ID_SALON")] CLASES cLASES) { if (ModelState.IsValid) { db.Entry(cLASES).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID_MATERIA = new SelectList(db.MATERIAS, "ID", "DESCRIPCION", cLASES.ID_MATERIA); ViewBag.ID_PROFESOR = new SelectList(db.PROFESORES, "ID", "DOCUMENTO", cLASES.ID_PROFESOR); ViewBag.ID_SALON = new SelectList(db.SALONES, "ID", "DESCRIPCION", cLASES.ID_SALON); return(View(cLASES)); }
// GET: CLASES/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CLASES cLASES = db.CLASES.Find(id); if (cLASES == null) { return(HttpNotFound()); } return(View(cLASES)); }
// GET: CLASES/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CLASES cLASES = db.CLASES.Find(id); if (cLASES == null) { return(HttpNotFound()); } ViewBag.ID_MATERIA = new SelectList(db.MATERIAS, "ID", "DESCRIPCION", cLASES.ID_MATERIA); ViewBag.ID_PROFESOR = new SelectList(db.PROFESORES, "ID", "DOCUMENTO", cLASES.ID_PROFESOR); ViewBag.ID_SALON = new SelectList(db.SALONES, "ID", "DESCRIPCION", cLASES.ID_SALON); return(View(cLASES)); }