示例#1
0
 public ActionResult Edit([Bind(Include = "Id,lectureName,staffID")] Lecture lecture)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lecture).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lecture));
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,lectureID,studentID")] pa pa)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pa).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(pa));
 }
示例#3
0
        public ActionResult Edit([Bind(Include = "Id,Name,Matrix,Year,Course,Gender")] Student student)
        {
            if (ModelState.IsValid)
            {
                db.Entry(student).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }


            return(View(student));
        }