public ActionResult List(int?gamesys, bool?hasGift, bool?isHot, bool?isNew, bool?IsBiWan, bool?isThisAweekHot, bool?isTuiJian, int?gameType, int?gameTeZhen, int?yunyingState, bool?isQianLiBao, bool?isGameType, int pageIndex = 1, int pageSize = 20) { var pagedList = _mobilgameTask.GetPagedList(gamesys, hasGift, isHot, isNew, IsBiWan, isThisAweekHot, isTuiJian, gameType, gameTeZhen, yunyingState, isQianLiBao, isGameType, pageIndex, pageSize); var boolselect = new SelectListItem { Selected = true, Text = "全部", Value = string.Empty }; var boolselectlist = new List <SelectListItem> { boolselect, new SelectListItem { Selected = false, Text = "是", Value = "True" }, new SelectListItem { Selected = false, Text = "否", Value = "False" }, }; ViewData["hasGiftList"] = boolselectlist; ViewData["isHotList"] = boolselectlist; ViewData["isNewList"] = boolselectlist; ViewData["IsBiWanList"] = boolselectlist; ViewData["isThisAweekHotList"] = boolselectlist; ViewData["isTuiJianList"] = boolselectlist; ViewData["isQianLiBaoList"] = boolselectlist; ViewData["isGameType"] = boolselectlist; var gameTypeList = GameTypeEnum.CeLve.ToSelectList(); gameTypeList.Insert(0, boolselect); ViewData["gameTypeList"] = gameTypeList; var gameTeZhenList = GameTeZhenEnum.Chongwu.ToSelectList(); ViewData["syslist"] = GameSysEnum.Andior.ToSelectListAddDefault(); gameTeZhenList.Insert(0, boolselect); ViewData["gameTeZhenList"] = gameTeZhenList; var yunyingStateList = YunYingStateEnum.XinFu.ToSelectList(); yunyingStateList.Insert(0, new SelectListItem { Selected = true, Text = "全部", Value = string.Empty, }); ViewData["yunyingStateList"] = yunyingStateList; var model = new PagedList <MobilGame>(pagedList.ToList(), pageIndex, pageSize, pagedList.TotalItemCount); return(View(model)); }
public ActionResult index(int?gamesys, bool?hasGift, bool?isHot, bool?isNew, bool?IsBiWan, bool?isThisAweekHot, bool?isTuiJian, int?gameType, int?gameTeZhen, int?yunyingState, bool?isQianLiBao, bool?isGameType, int pageIndex = 1, int pageSize = 25) { ViewData["gamesyslist"] = GameSysEnum.Andior.ToSelectList(); ViewData["gametypelist"] = GameTypeEnum.CeLve.ToSelectList(); ViewData["gameTeZhenlist"] = GameTeZhenEnum.JiShi.ToSelectList(); ViewData["yunyingStatelist"] = YunYingStateEnum.FengCe.ToSelectList(); //Session["gamesys"] = gamesys; //Session["gameType"] = gameType; //Session["gameTeZhen"] = gameTeZhen; //Session["yunyingState"] = yunyingState; var list = _mobilGameTask.GetPagedList(gamesys, hasGift, isHot, isNew, IsBiWan, isThisAweekHot, isTuiJian, gameType, gameTeZhen, yunyingState, isQianLiBao, isGameType, pageIndex, pageSize); var model = new PagedList <MobilGame>(list.ToList(), pageIndex, pageSize, list.TotalItemCount); return(View(model)); }