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")); }
public IActionResult Deposit(Deposit deposit) { var mgr = new SimchaFundManager(_connectionString); mgr.AddDeposit(deposit); TempData["message"] = "Deposit successfully recorded"; return(RedirectToAction("Index")); }
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")); }
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")); }