예제 #1
0
 public ActionResult DeleteUser(UserData User)
 {
     if (UserHelper.DeleteById(User.Id))
     {
         return RedirectToAction("ListUsers");
     }
     else
     {
         ModelState.AddModelError("", "Si è Verificato un Errore.");
     }
     return View(User);
 }
예제 #2
0
 public ActionResult DeleteUser(Guid Id)
 {
     UserEntity User = UserHelper.GetById(Id);
     UserData result = new UserData
     {
         Id = User.Id,
         Email = User.Email,
         Username = User.Username,
         CreationDate = User.CreationDate,
         IsAdmin = User.IsAdmin,
         IsOnLine = User.IsOnLine,
         LastLoginDate = User.LastLoginDate
     };
     return View(result);
 }