예제 #1
0
        public PaperListViewModel PaperTypeList(string type, string flag, string key)
        {
            PaperListViewModel paperListViewModel         = new PaperListViewModel();
            DataTable          dtTypeList                 = paperDAL.SearchPaperListByType(type);
            DataTable          dtSearchRandomList         = paperDAL.SearchRandomList(type);
            DataTable          dtSearchPaperHotListBytype = paperDAL.SearchPaperHotListBytype(type);
            DataTable          dtSubPage = paperDAL.SearchPaperToolPage();
            DataTable          dtTmpPage = paperDAL.SearchPaperTmpPage(flag, key);


            PaperInfoList    PaperInfoList    = new PaperInfoList();
            TemplateDownload templateDownload = new TemplateDownload();
            ToolDownloadList toolDownloadList = new ToolDownloadList();

            paperListViewModel.paperInfoList      = PaperInfoList;
            paperListViewModel.paperTmpPage       = templateDownload;
            paperListViewModel.paperToolPage      = toolDownloadList;
            paperListViewModel.paperInfoList.rows = dtTypeList.toList <PaperInfo>();
            paperListViewModel.randomList         = dtSearchRandomList.toList <PaperList>();
            paperListViewModel.HotList            = dtSearchPaperHotListBytype.toList <PaperList>();
            paperListViewModel.paperToolPage.rows = dtSubPage.toList <ToolDownloadInfo>();
            paperListViewModel.paperTmpPage.rows  = dtTmpPage.toList <TemplateDownloadInfo>();

            DataTable dtMenu = paperDAL.SearchMenuList();

            paperListViewModel.menuModelList = dtMenu.toList <MenuModel>();
            DataTable dtFootLink = paperDAL.SearchFootLink();

            paperListViewModel.footLinkList = dtFootLink.toList <FootLinkViewModel>();

            return(paperListViewModel);
        }