Esempio n. 1
0
        public PaperInit PaperInit()
        {
            PaperInit paperInit     = new PaperInit();
            DataTable dtAllTypeList = paperDAL.SearchAllTypeList();

            paperInit.allTypeList      = dtAllTypeList.toList <PaperList>();
            paperInit.allTypeListCount = dtAllTypeList.Rows.Count;

            DataTable dtSearchNewList = paperDAL.SearchNewList();

            paperInit.newList      = dtSearchNewList.toList <PaperList>();
            paperInit.newListCount = dtSearchNewList.Rows.Count;

            DataTable dtSearchRandomList = paperDAL.SearchPaperHotListBytype(null);

            paperInit.randomList      = dtSearchRandomList.toList <PaperList>();
            paperInit.randomListCount = dtSearchRandomList.Rows.Count;
            DataTable dtFootLink = paperDAL.SearchFootLink();

            paperInit.footLinkList = dtFootLink.toList <FootLinkViewModel>();
            DataTable dtMenu = paperDAL.SearchMenuList();

            paperInit.menuModelList = dtMenu.toList <MenuModel>();

            DataTable dtOtherPage = paperDAL.SearchOtherPage();

            paperInit.otherPageList = dtOtherPage.toList <OtherPageInfo>();
            paperInit.otherPageList = paperInit.otherPageList.Take(4).ToList <OtherPageInfo>();
            return(paperInit);
        }