Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            EtudiantNote etudiantNote = db.EtudiantNotes.Find(id);

            db.EtudiantNotes.Remove(etudiantNote);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "EtudiantNoteId,EtudiantId,MatiereId,NoteId,Valeur")] EtudiantNote etudiantNote)
 {
     if (ModelState.IsValid)
     {
         db.Entry(etudiantNote).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EtudiantId = new SelectList(db.Etudiants, "EtudiantId", "Nom", etudiantNote.EtudiantId);
     ViewBag.MatiereId  = new SelectList(db.Matieres, "MatiereId", "Nom", etudiantNote.MatiereId);
     ViewBag.NoteId     = new SelectList(db.Notes, "NoteId", "Type", etudiantNote.NoteId);
     return(View(etudiantNote));
 }
Example #3
0
        // GET: EtudiantNotes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EtudiantNote etudiantNote = db.EtudiantNotes.Find(id);

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

            if (etudiantNote == null)
            {
                return(HttpNotFound());
            }
            ViewBag.EtudiantId = new SelectList(db.Etudiants, "EtudiantId", "Nom", etudiantNote.EtudiantId);
            ViewBag.MatiereId  = new SelectList(db.Matieres, "MatiereId", "Nom", etudiantNote.MatiereId);
            ViewBag.NoteId     = new SelectList(db.Notes, "NoteId", "Type", etudiantNote.NoteId);
            return(View(etudiantNote));
        }