public ActionResult NewContributor(Contributor contributor, Deposit deposit) { SimchaDb db = new SimchaDb(Properties.Settings.Default.ConStr); deposit.ContributorId = db.AddContributor(contributor); db.AddDeposit(deposit); return(Redirect("/home/Contributors")); }
public ActionResult AddContributor(string Name, string PhoneNumber, decimal Balance, bool AlwaysInclude, DateTime Date) { SimchaDb sdb = new SimchaDb(Properties.Settings.Default.ConStr); int x = sdb.AddContributor(Name, PhoneNumber, AlwaysInclude, Date); sdb.AddDeposit(x, Balance, Date); return(Redirect("/Contributor/ContributorIndex")); }