public ActionResult RemoveCohortUsers(CohortUsers users) { db.removeCohortUsers(users.getIdsToRemove(), users.ProgramCohortID); return RedirectToAction("CohortUsers", new { ProgramCohortID = users.ProgramCohortID }); }
///////////////////////////////////////////////////////////////////////////////////////// public ActionResult Index(string Command, CohortUsers users = null, int ProgramCohortID = 0) { if (Command == "AddUsers") db.addCohortUsers(users.getIdsToAdd(), users.ProgramCohortID); else if (Command == "RemoveUsers") db.removeCohortUsers(users.getIdsToRemove(), users.ProgramCohortID); IEnumerable<ProgramCohort> model = db.getCohorts(); ViewBag.ProgramCohortID = ProgramCohortID; return View(model); }