public DeleteUserResponse DeleteUser(DeleteUserRequest request)
        {
            var response = new DeleteUserResponse {
                ResponseStatus = ResponseStatus.Success
            };

            var usersProvider = new UsersProvider();

            try
            {
                if (request.ActionType == ActionType.Delete)
                {
                    response.isSuccessful = usersProvider.DeleteUser(request);
                }
                else
                {
                    response.ResponseStatus      = ResponseStatus.Failure;
                    response.ResponseDescription = "Not update action";
                }
            }
            catch (Exception ex)
            {
                response.ResponseStatus      = ResponseStatus.Failure;
                response.ResponseDescription = ex.Message;
            }
            return(response);
        }
示例#2
0
        public async Task <ResponseViewModel <bool> > DeleteUser(int userId)
        {
            var data = new ResponseViewModel <bool>
            {
                Data = await _usersProvider.DeleteUser(userId)
            };

            return(data);
        }
示例#3
0
        public bool DeleteUser(uint id)
        {
            bool Success = false;

            try
            {
                Success = UsersProvider.DeleteUser(id);
            }
            catch {
            }
            return(Success);
        }
示例#4
0
 public static bool RemoveUser(string userID)
 {
     return(UsersProvider.DeleteUser(userID));
 }