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)); }
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)); }
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)); }
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); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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); }