Example #1
0
        public ActionResult AddTransaction(double amount, string description, int vendorId, int cofferId, int accountId)
        {
            Business.Models.TransactionModel model = new Business.Models.TransactionModel {
                Amount = amount, Description = description, VendorId = vendorId, CofferId = cofferId, AccountId = accountId
            };

            transactionService.AddTransaction(model);
            transactionService.ApplySpendingToCoffer(model.CofferId, model.Amount);
            accountService.UpdateAccountBalance(model.AccountId, model.Amount);

            return(null);
        }