public CandidateIndexModel getIndexModel(int UserID, int? ProgramCohortID, int? TaskID)
        {
            CandidateIndexModel model = new CandidateIndexModel() { };
            model.Cohorts = new SelectList(getCohortDrop(UserID), "Value", "Text", ProgramCohortID);
            model.ProgramCohortID = ProgramCohortID ?? Convert.ToInt32(model.Cohorts.First().Value);
            model.Tasks = getTaskDrop(model.ProgramCohortID);

            model.TaskID = TaskID ?? Convert.ToInt32(model.Tasks.First().Value);

            model.taskVersions = getTaskVersions(UserID, model.TaskID);

            return model;
        }
 public ActionResult Index(CandidateIndexModel post)
 {
     int userID = Convert.ToInt32(User.Identity.GetUserId());
     CandidateIndexModel model = db.getIndexModel(userID, post.ProgramCohortID, post.TaskID);
     return View(model);
 }