Example #1
0
        public ActionResult Index()
        {
            CatDao dao   = new CatDao();
            var    model = dao.GetList().ToList();

            return(View(model));
        }
Example #2
0
        public void setViewBag(int?catid = null)
        {
            CatDao dao = new CatDao();

            ViewBag.CatID = new SelectList(dao.GetList(), "CatID", "CatName", catid);
        }