Beispiel #1
0
 public IHttpActionResult SaveExpense(ExpenseSaveRequest request)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest());
     }
     return(Ok(ExpenseHandlers.SaveExpense(request)));
 }
Beispiel #2
0
        public IHttpActionResult GetExpenseByActionId(IdRequest request)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var response = ExpenseHandlers.GetExpenseByActionId(request);

            if (!response.IsSuccess)
            {
                return(NotFound());
            }
            return(Ok(response));
        }
Beispiel #3
0
        public IHttpActionResult GetExpenseRejectReason(ExpenseGetRequest request)
        {
            if (request == null)
            {
                return(BadRequest());
            }
            var response = ExpenseHandlers.GetRejectReason(request);

            if (!response.IsSuccess)
            {
                return(NotFound());
            }
            return(Ok(response));
        }
Beispiel #4
0
        public IHttpActionResult GetExpenseItemByExpenseId(ExpenseGetRequest request)
        {
            if (request == null)
            {
                return(BadRequest());
            }

            var response = ExpenseHandlers.GetExpenseItemsByExpenseId(request.ExpenseId);

            if (!response.IsSuccess)
            {
                return(NotFound());
            }
            return(Ok(response));
        }