Esempio n. 1
0
 public ActionResult Edit([Bind(Include = "Sdt,TenKH,DiachiKH,Ngaydangki,Matkhau,Level")] Account account)
 {
     if (ModelState.IsValid)
     {
         db.Entry(account).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(account));
 }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "id,username,password,lever")] user user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }