Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "CourseId,Title,Description,Duration,OutComes,CreditHours")] Course course)
 {
     if (ModelState.IsValid)
     {
         db.Entry(course).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(course));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ContentId,Description,ModuleId")] Content content)
 {
     if (ModelState.IsValid)
     {
         db.Entry(content).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ModuleId = new SelectList(db.Modules, "ModuleId", "ModuleName", content.ModuleId);
     return(View(content));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "ModuleId,ModuleName,CourseId")] Module module)
 {
     if (ModelState.IsValid)
     {
         db.Entry(module).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CourseId = new SelectList(db.Courses, "CourseId", "Title", module.CourseId);
     return(View(module));
 }