예제 #1
0
        public ViewResult SearchList(string key, string type)
        {
            if (Session["user"] != null)
            {
                List <UserRecord> list = (List <UserRecord>)Session["user"];
                ViewData["login"] = list[0].Name;
            }
            else
            {
                ViewData["login"] = string.Empty;
            }
            PaperBLL           paperBLL           = new PaperBLL();
            PaperListViewModel paperListViewModel = paperBLL.PaperSearchList(key, type);

            paperListViewModel.paperInfoList.total = paperListViewModel.paperInfoList.rows.Count();
            paperListViewModel.paperInfoList.rows  = paperListViewModel.paperInfoList.rows.Take(9).ToList <PaperInfo>();
            if (string.IsNullOrEmpty(type))
            {
                ViewData["type"] = "";
            }
            else
            {
                ViewData["type"] = type;
            }
            ViewData["key"]    = key;
            ViewBag.ImageModel = paperBLL.SearchImgManage().rows;
            return(View("SearchList", paperListViewModel));
        }
예제 #2
0
        public ViewResult SearchListPaging(int pageNo, string key, string type)
        {
            if (Session["user"] != null)
            {
                List <UserRecord> list = (List <UserRecord>)Session["user"];
                ViewData["login"] = list[0].Name;
            }
            else
            {
                ViewData["login"] = string.Empty;
            }
            PaperBLL           paperBLL           = new PaperBLL();
            PaperListViewModel paperListViewModel = paperBLL.PaperSearchList(key, type);

            paperListViewModel.paperInfoList.total = paperListViewModel.paperInfoList.rows.Count();
            paperListViewModel.paperInfoList.rows  = paperListViewModel.paperInfoList.rows.Skip((pageNo - 1) * 9).Take(9).ToList <PaperInfo>();
            if (string.IsNullOrEmpty(type))
            {
                ViewData["type"] = "";
            }
            else
            {
                ViewData["type"] = type;
            }
            return(View("_searchListPaging", paperListViewModel));
        }
예제 #3
0
        public ViewResult TmpListPaging(int pageNo, string type, string flag)
        {
            if (Session["user"] != null)
            {
                List <UserRecord> list = (List <UserRecord>)Session["user"];
                ViewData["login"] = list[0].Name;
            }
            else
            {
                ViewData["login"] = string.Empty;
            }
            PaperBLL paperBLL = new PaperBLL();

            PaperListViewModel paperListViewModel = paperBLL.PaperTypeList(null, flag, null);

            paperListViewModel.paperTmpPage.total = paperListViewModel.paperTmpPage.rows.Count();
            paperListViewModel.paperTmpPage.rows  = paperListViewModel.paperTmpPage.rows.Skip((pageNo - 1) * 6).Take(6).ToList <TemplateDownloadInfo>();
            if (string.IsNullOrEmpty(flag))
            {
                ViewData["Tmptype"] = "0";
            }
            else
            {
                ViewData["Tmptype"] = flag;
            }
            return(View("_tmplateDownloadPaging", paperListViewModel));
        }
예제 #4
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);
        }
예제 #5
0
        public ViewResult TemplateDownload(string flag, string key)
        {
            if (Session["user"] != null)
            {
                List <UserRecord> list = (List <UserRecord>)Session["user"];
                ViewData["login"] = list[0].Name;
            }
            else
            {
                ViewData["login"] = string.Empty;
            }
            PaperBLL           paperBLL           = new PaperBLL();
            PaperListViewModel paperListViewModel = paperBLL.PaperTypeList(null, flag, key);

            paperListViewModel.paperTmpPage.total = paperListViewModel.paperTmpPage.rows.Count();
            paperListViewModel.paperTmpPage.rows  = paperListViewModel.paperTmpPage.rows.Take(6).ToList <TemplateDownloadInfo>();

            TemplateDownloadBLL templateDownloadBLL = new TemplateDownloadBLL();
            TemplateTypeList    templateTypeList    = new TemplateTypeList();

            templateTypeList = templateDownloadBLL.getTemplateTypeData();
            List <SelectListItem> select = new List <SelectListItem>();

            select.Add(new SelectListItem
            {
                Text  = "全部分类",
                Value = "0"
            });

            for (int i = 0; i < templateTypeList.rows.Count; i++)
            {
                select.Add(new SelectListItem
                {
                    Text  = templateTypeList.rows[i].TemplateType.ToString(),
                    Value = templateTypeList.rows[i].Id.ToString()
                });
            }
            if (string.IsNullOrEmpty(flag))
            {
                ViewData["Tmptype"] = "0";
            }
            else
            {
                ViewData["Tmptype"] = flag;
            }
            ViewData["selTmpType"] = new SelectList(select, "Value", "Text", "");
            ViewBag.ImageModel     = paperBLL.SearchImgManage().rows;
            return(View("TemplateDownload", paperListViewModel));
        }
예제 #6
0
        public ViewResult About()
        {
            if (Session["user"] != null)
            {
                List <UserRecord> list = (List <UserRecord>)Session["user"];
                ViewData["login"] = list[0].Name;
            }
            else
            {
                ViewData["login"] = string.Empty;
            }
            PaperBLL           paperBLL           = new PaperBLL();
            PaperListViewModel paperListViewModel = paperBLL.PaperTypeList(null, null, null);

            ViewBag.ImageModel = paperBLL.SearchImgManage().rows;
            ViewBag.About      = paperBLL.SearchAboutUs();
            return(View("About", paperListViewModel));
        }
예제 #7
0
        public ViewResult ToolDownload()
        {
            if (Session["user"] != null)
            {
                List <UserRecord> list = (List <UserRecord>)Session["user"];
                ViewData["login"] = list[0].Name;
            }
            else
            {
                ViewData["login"] = string.Empty;
            }
            PaperBLL           paperBLL           = new PaperBLL();
            PaperListViewModel paperListViewModel = paperBLL.PaperTypeList(null, null, null);

            paperListViewModel.paperToolPage.total = paperListViewModel.paperToolPage.rows.Count();
            paperListViewModel.paperToolPage.rows  = paperListViewModel.paperToolPage.rows.Take(6).ToList <ToolDownloadInfo>();
            ViewBag.ImageModel = paperBLL.SearchImgManage().rows;
            return(View("ToolDownload", paperListViewModel));
        }
예제 #8
0
        public ViewResult ListPaging(int pageNo, string type)
        {
            if (Session["user"] != null)
            {
                List <UserRecord> list = (List <UserRecord>)Session["user"];
                ViewData["login"] = list[0].Name;
            }
            else
            {
                ViewData["login"] = string.Empty;
            }
            PaperBLL paperBLL = new PaperBLL();

            PaperListViewModel paperListViewModel = paperBLL.PaperTypeList(type, null, null);

            paperListViewModel.paperInfoList.total = paperListViewModel.paperInfoList.rows.Count();
            paperListViewModel.paperInfoList.rows  = paperListViewModel.paperInfoList.rows.Skip((pageNo - 1) * 9).Take(9).ToList <PaperInfo>();

            return(View("_paperListVPaging", paperListViewModel));
        }
예제 #9
0
        public ViewResult List(string type, string flag)
        {
            if (Session["user"] != null)
            {
                List <UserRecord> list = (List <UserRecord>)Session["user"];
                ViewData["login"] = list[0].Name;
            }
            else
            {
                ViewData["login"] = string.Empty;
            }
            PaperBLL           paperBLL           = new PaperBLL();
            PaperListViewModel paperListViewModel = paperBLL.PaperTypeList(type, flag, null);

            paperListViewModel.paperInfoList.total = paperListViewModel.paperInfoList.rows.Count();
            paperListViewModel.paperInfoList.rows  = paperListViewModel.paperInfoList.rows.Take(9).ToList <PaperInfo>();
            ViewData["type"]   = type;
            ViewBag.ImageModel = paperBLL.SearchImgManage().rows;
            return(View("PaperListV", paperListViewModel));
        }
예제 #10
0
        public ViewResult ToolListPaging(int pageNo)
        {
            if (Session["user"] != null)
            {
                List <UserRecord> list = (List <UserRecord>)Session["user"];
                ViewData["login"] = list[0].Name;
            }
            else
            {
                ViewData["login"] = string.Empty;
            }
            PaperBLL paperBLL = new PaperBLL();

            PaperListViewModel paperListViewModel = paperBLL.PaperTypeList(null, null, null);

            paperListViewModel.paperToolPage.total = paperListViewModel.paperToolPage.rows.Count();
            paperListViewModel.paperToolPage.rows  = paperListViewModel.paperToolPage.rows.Skip((pageNo - 1) * 6).Take(6).ToList <ToolDownloadInfo>();

            return(View("_toolDownloadPaging", paperListViewModel));
        }
예제 #11
0
        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);
        }