Ejemplo n.º 1
0
 //Select Organization By DropDOwn
 private List <SelectListItem> GetOrganizationList()
 {
     return(_trainerManager.GetAllOrganization()
            .Select(c => new SelectListItem()
     {
         Value = c.Id.ToString(), Text = c.Name
     }).ToList());
 }
Ejemplo n.º 2
0
        public List <SelectListItem> GetAllOrganizationSlItems()
        {
            var organizations = _trainerManager.GetAllOrganization();
            var slItems       = new List <SelectListItem>();

            foreach (var organization in organizations)
            {
                var sli = new SelectListItem();
                sli.Text  = organization.Name + " - " + organization.Code;
                sli.Value = organization.Id.ToString();
                slItems.Add(sli);
            }
            return(slItems);
        }