public List <SelectListItem> GetStateList()
        {
            List <SelectListItem> lstStateList = new List <SelectListItem>();
            var data = _StateWebTask.GetStateList();

            lstStateList = data.Select(x => new SelectListItem
            {
                Text  = x.StateName,
                Value = x.StateId.ToString(),
            }).ToList();

            return(lstStateList);
        }
Exemple #2
0
        // GET: Cource
        public ActionResult Index()
        {
            var stateList = _stateWebTask.GetStateList();

            return(View(stateList));
        }