コード例 #1
0
        // GET: KhowBase
        public ActionResult Index()
        {
            ViewKnowBase view = new ViewKnowBase()
            {
                Authoritys     = KnowBaseRepository.Authoritys.ToList(),
                Services       = KnowBaseRepository.Services.ToList(),
                ViewAuthoritys = KnowBaseRepository.ViewAuthorits.ToList()
            };

            return(View(view));
        }
コード例 #2
0
        public ActionResult Index(string search)
        {
            ViewKnowBase view = new ViewKnowBase()
            {
                Authoritys     = KnowBaseRepository.Authoritys.Where(s => s.Name.IndexOf(search) > -1),
                Services       = KnowBaseRepository.Services.ToList(),
                ViewAuthoritys = KnowBaseRepository.ViewAuthorits.ToList()
            };

            ViewBag.Search = search;
            return(View(view));
        }