示例#1
0
        public List <SelectListItem> getlistdosen()
        {
            var lstdosen = new List <SelectListItem>();
            var data     = ds.GetDosen();

            foreach (var dos in data)
            {
                lstdosen.Add(new SelectListItem
                {
                    Value = dos.Nik,
                    Text  = dos.Nama
                });
            }

            return(lstdosen);
        }
示例#2
0
        public IActionResult Index()
        {
            var data = _dsn.GetDosen();

            return(View(data));
        }