示例#1
0
 public ActionResult Edit([Bind(Include = "ID,Name,Password")] Models.Main main)
 {
     if (ModelState.IsValid)
     {
         db.Entry(main).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(main));
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "ID,Subject,Remark,Day,Date,Assignment,Time,Recitation,Comment,Quiz,Seatwork,Midterm,Final")] Log log)
 {
     if (ModelState.IsValid)
     {
         db.Entry(log).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(log));
 }