예제 #1
0
        public ActionResult DeleteConfirmed(RegisterDeleteSellerUserViewModel model)
        {
            if (ModelState.IsValid)
            {
                var result = userManager.Delete(userManager.FindById(model.Id));

                if (result.Succeeded)
                {
                    return(RedirectToAction("Index", "SellerUser"));
                }
                AddErrors(result);
            }

            return(View(model));
        }
예제 #2
0
        public ActionResult Delete(string userId)
        {
            if ((userId == null) || (userId.Length == 0))
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            SellerUser user = userManager.FindById(userId);

            RegisterDeleteSellerUserViewModel model = new RegisterDeleteSellerUserViewModel();

            model.Id        = userId;
            model.Email     = user.Email;
            model.FirstName = user.FirstName;
            model.LastName  = user.LastName;

            return(View(model));
        }