Esempio n. 1
0
        public PmsResponseDto DeleteUser(int userId)
        {
            if (userId <= 0)
            {
                throw new PmsException("User is not valid. Hence User can not be deleted.");
            }

            var response = new PmsResponseDto();

            if (_iPmsLogic.DeleteUser(userId))
            {
                response.ResponseStatus    = PmsApiStatus.Success.ToString();
                response.StatusDescription = "Record deleted successfully.";
            }
            else
            {
                response.ResponseStatus    = PmsApiStatus.Failure.ToString();
                response.StatusDescription = "Operation failed.Please contact administrator.";
            }
            return(response);
        }