Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            MATRICULAS mATRICULAS = db.MATRICULAS.Find(id);

            db.MATRICULAS.Remove(mATRICULAS);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID,ID_CLASE,ID_ALUMNO,NOTA,FECHA_NOTA")] MATRICULAS mATRICULAS)
 {
     if (ModelState.IsValid)
     {
         db.Entry(mATRICULAS).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ID_ALUMNO = new SelectList(db.ALUMNOS, "ID", "DOCUMENTO", mATRICULAS.ID_ALUMNO);
     ViewBag.ID_CLASE  = new SelectList(db.CLASES, "ID", "ID", mATRICULAS.ID_CLASE);
     return(View(mATRICULAS));
 }
Example #3
0
        // GET: MATRICULAS/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MATRICULAS mATRICULAS = db.MATRICULAS.Find(id);

            if (mATRICULAS == null)
            {
                return(HttpNotFound());
            }
            return(View(mATRICULAS));
        }
Example #4
0
        // GET: MATRICULAS/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MATRICULAS mATRICULAS = db.MATRICULAS.Find(id);

            if (mATRICULAS == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ID_ALUMNO = new SelectList(db.ALUMNOS, "ID", "DOCUMENTO", mATRICULAS.ID_ALUMNO);
            ViewBag.ID_CLASE  = new SelectList(db.CLASES, "ID", "ID", mATRICULAS.ID_CLASE);
            return(View(mATRICULAS));
        }