Ejemplo n.º 1
0
        public void MakeCohortSelectList()
        {
            List <Cohort> cohorts = CohortRepository.GetAllCohorts();

            Cohorts = cohorts.Select(li => new SelectListItem
            {
                Text  = li.CohortName,
                Value = li.Id.ToString()
            }).ToList();
        }
Ejemplo n.º 2
0
        public void BuildCohortOptions()
        {
            Cohorts = CohortRepository.GetAllCohorts()
                      .Select(li => new SelectListItem
            {
                Text  = li.Designation,
                Value = li.Id.ToString()
            }).ToList();

            Cohorts.Insert(0, new SelectListItem
            {
                Text  = "Choose cohort...",
                Value = "0"
            });
        }
Ejemplo n.º 3
0
        // GET: Cohort
        public ActionResult Index(string _orderBy)
        {
            var cohorts = CohortRepository.GetAllCohorts();

            return(View(cohorts));
        }