Exemple #1
0
        public ActionResult NewStudent()
        {
            var listClass = _dMService.getAllClass();


            if (listClass.Count > 0)
            {
                var listItems = new List <SelectListItem>();
                foreach (var item in listClass)
                {
                    listItems.Add(new SelectListItem {
                        Text = item.ClassName, Value = item.Id.ToString()
                    });
                }

                ViewBag.lissClassItems = listItems;
            }

            return(View());
        }
Exemple #2
0
        public ActionResult Index()
        {
            var listClass = _dmService.getAllClass();

            return(View(listClass));
        }