public PaperListViewModel PaperSearchList(string key, string type) { PaperListViewModel paperListViewModel = new PaperListViewModel(); DataTable dtTypeList = paperDAL.SearchPaperList(key, type); DataTable dtSearchRandomList = paperDAL.SearchRandomList(null); DataTable dtSearchPaperHotListBytype = paperDAL.SearchPaperHotListBytype(null); PaperInfoList PaperInfoList = new PaperInfoList(); paperListViewModel.paperInfoList = PaperInfoList; paperListViewModel.paperInfoList.rows = dtTypeList.toList <PaperInfo>(); paperListViewModel.randomList = dtSearchRandomList.toList <PaperList>(); paperListViewModel.HotList = dtSearchPaperHotListBytype.toList <PaperList>(); DataTable dtFootLink = paperDAL.SearchFootLink(); paperListViewModel.footLinkList = dtFootLink.toList <FootLinkViewModel>(); DataTable dtMenu = paperDAL.SearchMenuList(); paperListViewModel.menuModelList = dtMenu.toList <MenuModel>(); return(paperListViewModel); }