Exemple #1
0
        public ActionResult ReturnLoanedItem(int loanId)
        {
            var loan = _loanService.GetLoanByID(loanId);

            if (_loanService.ChangeLoanStatus(loan, true))
            {
                //make item available
                _itemService.ChangeItemStatus(loan.Request.Item, true);
                return(Json("Success"));
            }
            else
            {
                return(Json("Failure"));
            }
        }