コード例 #1
0
 public ActionResult Edit([Bind(Include = "BI,Tema")] Predmet predmet)
 {
     if (ModelState.IsValid)
     {
         db.Entry(predmet).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(predmet));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "BI,PredmetId,Ocena")] Ispit ispit)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ispit).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PredmetId = new SelectList(db.Predmets, "BI", "Tema", ispit.PredmetId);
     return(View(ispit));
 }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "StudentId,IspitId")] StudentIspit studentIspit)
 {
     if (ModelState.IsValid)
     {
         db.Entry(studentIspit).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.IspitId   = new SelectList(db.Ispits, "BI", "Ime", studentIspit.IspitId);
     ViewBag.StudentId = new SelectList(db.Students, "BI", "Ime", studentIspit.StudentId);
     return(View(studentIspit));
 }