예제 #1
0
 public ActionResult ChangePassword(fifness.Models.USER userModel)
 {
     using (db)
     {
         try
         {
             db.Entry(userModel).State = EntityState.Modified;
             db.USERs.Add(userModel);
             db.SaveChanges();
         }
         catch (Exception ex)
         {
             return(View("ChangePassword", new fifness.Models.USER()));
         }
         ModelState.Clear();
         ViewBag.ThongBao = "Đăng kí thành công";
     }
     return(View("ChangePassword", new fifness.Models.USER()));
 }
예제 #2
0
파일: UserDao.cs 프로젝트: dthoan/school
 public long Insert(USER entity)
 {
     db.USERs.Add(entity);
     db.SaveChanges();
     return(entity.ID);
 }
예제 #3
0
 public ActionResult ChangePassword(int ID = 0)
 {
     fifness.Models.USER userModel = new fifness.Models.USER();
     return(View(userModel));
 }