예제 #1
0
 public ActionResult ProfileDetailsEdit([Bind(Include = "UserID,Forenames,Surname,EmailAddress,DateOfBirth,FirstnameBasedOnForename,FullName,Position,ListOfDegree,LinkOfDegree,CourseName,DurationInMonths,CoursesPartOfDegree,DegreeName,DegreeDuringInYears,CoursesOfDegree")] UserDetail userDetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userDetail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("ProfileDetails"));
     }
     return(View(userDetail));
 }
예제 #2
0
 public ActionResult Edit([Bind(Include = "CourseID,CourseName,DurationInMonths,CoursesPartOfDegree,Degree")] Course course)
 {
     if (ModelState.IsValid)
     {
         db.Entry(course).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(course));
 }
예제 #3
0
 public ActionResult Edit([Bind(Include = "DegreeID,DegreeName,DegreeDuringInYears,CoursesOfDegree,UserID")] Degree degree)
 {
     if (ModelState.IsValid)
     {
         db.Entry(degree).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserID = new SelectList(db.UserDetails, "UserID", "Forenames", degree.UserID);
     return(View(degree));
 }