示例#1
0
        public PmsResponseDto DeleteExpenseCategory(int ExpenseCategoryId)
        {
            if (ExpenseCategoryId <= 0)
            {
                throw new PmsException("ExpenseCategory Type is not valid. Hence ExpenseCategory Type can not be deleted.");
            }

            var response = new PmsResponseDto();

            if (_iPmsLogic.DeleteExpenseCategory(ExpenseCategoryId))
            {
                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);
        }