コード例 #1
0
        public ActionResult Deposit(Deposit deposit)
        {
            var mgr = new SimchaFundManager(Properties.Settings.Default.ConStr);

            mgr.AddDeposit(deposit);
            TempData["Message"] = "Deposit of $" + deposit.Amount + " recorded successfully";
            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public IActionResult Deposit(Deposit deposit)
        {
            var mgr = new SimchaFundManager(_connectionString);

            mgr.AddDeposit(deposit);
            TempData["message"] = "Deposit successfully recorded";
            return(RedirectToAction("Index"));
        }
コード例 #3
0
        public ActionResult New(Contributor contributor, decimal initialDeposit)
        {
            var mgr = new SimchaFundManager(Properties.Settings.Default.ConStr);

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

            mgr.AddDeposit(deposit);
            TempData["Message"] = "New Contributor Created! Id: " + contributor.Id;
            return(RedirectToAction("index"));
        }
コード例 #4
0
        public IActionResult New(Contributor contributor, decimal initialDeposit)
        {
            var mgr = new SimchaFundManager(_connectionString);

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

            mgr.AddDeposit(deposit);
            TempData["Message"] = $"New Contributor Created! Id: {contributor.Id}";
            return(RedirectToAction("index"));
        }