/// <summary> /// 搜索结果 /// </summary> /// <param name="key"></param> /// <param name="page"></param> /// <returns></returns> public ActionResult PartSearch(string key, int page = 1) { CodeNote.Common.PageList<Entity.VwArticle> model = null; if (!string.IsNullOrEmpty(key)) { key = key.Trim(); if (!string.IsNullOrEmpty(key)) { CodeNote.Luc.ArtilceLuc artLuc = new Luc.ArtilceLuc(); model = artLuc.Search(key, page, 10); ViewData["key"] = key; } } return PartialView("PartSearch", model); }
public ActionResult Index() { string key = Request["q"]; if (!string.IsNullOrEmpty(key)) { CodeNote.Common.PageList<Entity.VwArticle> model = null; key = key.Trim(); if (!string.IsNullOrEmpty(key)) { CodeNote.Luc.ArtilceLuc artLuc = new Luc.ArtilceLuc(); model = artLuc.Search(key, 1, 10); ViewData["key"] = key; } return View("Search", model); } return View("Index"); }