Example #1
0
        public ActionResult GameNameListPartial()
        {
            var data = GameBll.LoadEntities(n => n.Id > 0).Select(n => new GameName {
                Name = n.Name
            }).ToList();

            ViewBag.GameName = data;
            return(PartialView("GameNameListPartial"));
        }
Example #2
0
 public ActionResult GameIndex()
 {
     //轮播推荐区:总后台游戏推荐管理,热门推荐。最多显示8个
     ViewBag.RecHotGame = GameBll.LoadEntities(g => g.State == "1" && g.Rec_Hot == "1").OrderByDescending(g => g.Rec_Hot_Time).Select(g => new GameViewModel2()
     {
         Id     = g.Id,
         BigImg = g.BigImg
     }).Take(8).ToList();
     //seo推荐游戏
     ViewBag.RecSeoGame = SeoBll.GetSeoData(3, "2");
     return(View());
 }
Example #3
0
        public ActionResult AllGameName(string gameName)
        {
            //数据匹配  有数据 不提示、不匹配直接提示

            var allGameName = GameBll.LoadEntities(g => g.Name == gameName).Select(g => new { g.Name }).FirstOrDefault();

            if (allGameName != null)
            {
                return(Content("ok"));
            }
            else
            {
                return(Content("no"));
            }
        }
Example #4
0
        public ActionResult GameDetail(int id)
        {
            ViewData.Model             = GameBll.LoadEntities(g => g.Id == id).FirstOrDefault();
            ViewBag.GameRelatedNews    = GameBll.GetGameRelatedNews(id);
            ViewBag.GameRelatedRaiders = GameBll.GetGameRelatedRaiders(id);

            //相关开服
            ViewBag.GameRelatedService     = GameBll.GetGameRelatedService(id);
            ViewData["GameRelatedPackage"] = GameBll.GetGameRelatedPackage(id);
            //福利--游戏试玩
            ViewBag.GameRelatedDemo = GameBll.GetGameRelatedDemo(id);
            //游戏截图
            ViewBag.GameCutImg = GameBll.GetGameCutImgInfo(id);
            //该游戏相关推荐同类型游戏随机显示
            ViewBag.GameRelatedType = GameBll.GetGameSameTypeData(id);
            //联运
            ViewBag.CpyGame = GameBll.GetGameCpy(id);
            return(View());
        }
Example #5
0
        public ActionResult GameLikePlusOne(int id)
        {
            var game = GameBll.LoadEntities(g => g.Id == id).FirstOrDefault();

            if (game != null)
            {
                game.LikeNum = game.LikeNum == null?1:game.LikeNum + 1;
                if (GameBll.Update(game))
                {
                    return(Content("ok"));
                }
                else
                {
                    return(Content("no"));
                }
            }
            else
            {
                return(Content("noExist"));
            }
        }
Example #6
0
        public ActionResult GameName()
        {
            var allGameName = GameBll.LoadEntities(g => true).Select(g => new { g.Name });

            return(Json(allGameName, JsonRequestBehavior.AllowGet));
        }