예제 #1
0
        public ActionResult GridViewPartialUsersUpdate([ModelBinder(typeof(DevExpressEditorsBinder))] RegisterViewModel model)
        {
            if (ModelState.IsValid)
            {
                var user = UserManager.FindByName(model.UserName);

                user.PasswordRaw = model.Password;

                user.PasswordHash = UserManager.PasswordHasher.HashPassword(model.Password);

                var result = UserManager.Update(user);
            }

            var item = UserManager.Users.Select(c => new RegisterViewModel()
            {
                UserName = c.UserName, Email = c.Email, Password = c.PasswordRaw
            });

            return(PartialView("_GridViewPartialUsers", item.ToList()));
        }