public ActionResult Edit(Contributors contributor) { var mgr = new SimchaFundManager(Properties.Settings.Default.ConStr); mgr.UpdateContributor(contributor); TempData["Message"] = "Contributor updated successfully"; return(RedirectToAction("Index")); }
public ActionResult New(Contributors contributor, decimal initialDeposit) { var mgr = new SimchaFundManager(Properties.Settings.Default.ConStr); mgr.AddContributor(contributor); var deposit = new Deposits { Amount = initialDeposit, ContributorId = contributor.Id, Date = contributor.Date }; mgr.AddDeposit(deposit); TempData["Message"] = $"New Contributor Created! Id: {contributor.Id}"; return(RedirectToAction("index")); }