Пример #1
0
        public ActionResult Add()
        {
            List <SelectListItem> list = new List <SelectListItem>();
            var l = cbll.GetAll();

            foreach (var item in l)
            {
                list.Add(new SelectListItem()
                {
                    Text  = item.cTitle,
                    Value = item.cId.ToString()
                });
            }
            ViewBag.ClassList = list;

            return(View());
        }
Пример #2
0
 // GET: ClassInfo
 public ActionResult Index()
 {
     ViewData.Model = bll.GetAll();
     return(View());
 }