コード例 #1
0
        public ActionResult Index(string searchString, int page = 1, int pageSize = 10)
        {
            var dao   = new ChucNangDao();
            var model = dao.ListAllPaging(searchString, page, pageSize);

            ViewBag.SearchString = searchString;
            return(View(model));
        }
コード例 #2
0
        public void SetViewBagChucNang(int?ChucNangID = null)
        {
            var dao = new ChucNangDao();

            ViewBag.ChucNangID = new SelectList(dao.ListAll(), "ChucNangID", "TenChucNang", ChucNangID);
        }