Пример #1
0
        public ActionResult IndexAjax(string searchQuery)
        {
            IEnumerable <DataModelView> resultlist;

            resultlist = DataModelView.GetDataModelList().Where(p => p.Name.Contains(searchQuery) || searchQuery == p.Name + " " + p.FileName).ToArray();

            return(PartialView("ResultView", resultlist));
        }
Пример #2
0
        public ActionResult Index(string searchQuery)
        {
            IEnumerable <DataModelView> resultlist;

            resultlist = DataModelView.GetDataModelList().ToArray();

            return(View(resultlist));
        }
Пример #3
0
        public ActionResult PersonSuggestion(string term)
        {
            var personList = DataModelView.GetDataModelList().Where(p => p.Name.Contains(term));

            return(Json(personList, JsonRequestBehavior.AllowGet));
        }