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 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");
 }
示例#3
0
 public ActionResult Deposit(int id, double amount)
 {
     SimchaFundManager manager = new SimchaFundManager(Properties.Settings.Default.ConStr);
     manager.AddDeposit(id, amount);
     return Redirect("Contributors");
 }