public IActionResult History(int id) { SFundDb db = new SFundDb(_connectionString); ContributorHistoryViewModel vm = new ContributorHistoryViewModel(); List <Transaction> transactions = db.GetDeposits(id); if (db.GetContributions(id) != null) { transactions.AddRange(db.GetContributions(id)); } vm.Transactions = transactions; vm.Contributor = db.GetContributor(id); return(View(vm)); }
public IActionResult Contributions(int Id) { SFundDb db = new SFundDb(_connectionString); ContributionsViewModel vm = new ContributionsViewModel(); vm.Simcha = db.GetSimcha(Id); vm.Contributors = db.GetContributors(); vm.SimchaContributions = db.GetContributions().Where(c => c.SimchaId == Id).ToList(); return(View(vm)); }
public IActionResult Index() { SFundDb db = new SFundDb(_connectionString); SimchasViewModel vm = new SimchasViewModel(); vm.Simchas = db.GetSimchas(); vm.ContributorCount = db.GetContributors().Count; vm.Contributions = db.GetContributions(); return(View(vm)); }