Ejemplo n.º 1
0
        public IActionResult Deposit(Deposit deposit)
        {
            var manager = new SimchaChipInManager(_connectionString);

            manager.AddDeposit(deposit);
            TempData["message"] = "Deposit successfully recorded";
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public IActionResult New(Contributor contributor, decimal initialDeposit)
        {
            var manager = new SimchaChipInManager(_connectionString);

            manager.AddContributor(contributor);
            var deposit = new Deposit
            {
                Amount        = initialDeposit,
                ContributorId = contributor.Id,
                Date          = contributor.Date
            };

            manager.AddDeposit(deposit);
            return(RedirectToAction("index"));
        }