// GET: AuthorManage public ActionResult Index(String name, Int32 pageIndex = 0) { if (!string.IsNullOrEmpty(name)) { name = name.Trim(); } AuthorManageIndexModel model = new AuthorManageIndexModel(); model.FilterName = name; AuthorInfoCondition condition = new AuthorInfoCondition(); condition.AuthorName = name; IEnumerable<AuthorInfo> AuthorList = this.IAuthorInfoDataProvider.GetAuthorList(condition); PagingContent<AuthorInfo> paging = new PagingContent<AuthorInfo>(AuthorList, pageIndex); foreach (var item in paging.EntityList) { model.AuthorModelList.Add(AuthorModel.GetViewModel(item)); } model.PagingContent = paging; return View(model); }
public ActionResult Index(AuthorManageIndexModel model) { return RedirectToAction("Index", new { name = model.FilterName }); }