Beispiel #1
0
 public ActionResult Edit(Result result)
 {
     if (ModelState.IsValid)
     {
         db.Entry(result).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Department = new SelectList(db.Department, "ID", "Name", result.Department);
     ViewBag.Proposal   = new SelectList(db.Proposal, "ID", "Title", result.Proposal);
     return(View(result));
 }