public ActionResult MyGameDemo() { int pageIndex = int.Parse(Request["pageIndex"] ?? "1"); int pageSize = int.Parse(Request["pageSize"] ?? "15"); int totalCount = 0; var data = GameDemoBll.GetMyGameDemo(GetCurrentUser(), pageIndex, pageSize, out totalCount) .Select(d => new MyGameDemo() { GameDemoId = d.GameDemoId, AccountId = d.AccountId, GameName = d.GameName, SystemName = d.SystemName, Url = d.Url, Account = d.Account, Pwd = d.Pwd, Coins = d.Coins, InTime = d.InTime, Type = d.Type, PassCheck = d.PassCheck, Progress = d.Progress }).ToList(); var NavStr = Common.LaomaPager.ShowPageNavigate(pageSize, pageIndex, totalCount); var result = new { Data = data, NavStr = NavStr }; return(Json(result, JsonRequestBehavior.AllowGet)); }
public ActionResult DemoGetAccount() { string systemName = Request["systemName"]; string area = "", city = "", realIP = ""; Sql_DemoModel data = null; try { HttpWebRequest reqHttpWeb = (HttpWebRequest)WebRequest.Create(string.Format("http://ip.ws.126.net/ipquery?ip=", realIP)); StreamReader responseReader = new StreamReader(reqHttpWeb.GetResponse().GetResponseStream(), System.Text.Encoding.Default); string json = responseReader.ReadToEnd(); Match m = Regex.Match(json, @"var lo=""(.*?)"", lc=""(.*?)""(.*)", RegexOptions.IgnoreCase | RegexOptions.Singleline); //[\s]* if (m.Success) { area = m.Result("$1"); city = m.Result("$2"); } } catch { } if (!string.IsNullOrEmpty(Request["userId"]) && !string.IsNullOrEmpty(Request["gamedemoId"])) { int userId = int.Parse(Request["userId"]); int gamedemoId = int.Parse(Request["gamedemoId"]); data = GameDemoBll.DemoGetAccount(gamedemoId, userId, systemName, area, city); } return(Json(data, JsonRequestBehavior.AllowGet)); }
//试玩第二步 public ActionResult DemoDetail_Step2() { int userId = int.Parse(Request["userId"]); int gamedemoId = int.Parse(Request["gamedemoId"]); var data = GameDemoBll.DemoDetail_Step2(userId, gamedemoId).ToList(); return(Json(data, JsonRequestBehavior.AllowGet)); }
public ActionResult DemoMaxRecharge() { int userId = int.Parse(Request["userId"]); int gamedemoId = int.Parse(Request["gamedemoId"]); int accountId = int.Parse(Request["accountId"]); var data = GameDemoBll.DemoMaxRecharge(userId, gamedemoId, accountId).ToList(); return(Json(data, JsonRequestBehavior.AllowGet)); }
public ActionResult _RightPackage() { //最赞攻略 ViewData["MostGreatRaiders"] = UserRaidersBll.GetMostGreatRaiders(); //右侧数据展示 var otherController = DependencyResolver.Current.GetService <NewsInfoController>(); ViewBag.NewsetGameDemo = GameDemoBll.GetNewestGameDemo(); return(PartialView("_RightPackage")); }
public ActionResult AmoyWelFare() { List <GameDemoViewModel> list = GameDemoBll.GetRecForumDemo(); ViewData["GameDemo"] = list; List <Gift> giftlist = GiftBll.NewestPublishGift(); ViewBag.NewestGift = giftlist; return(View()); }
public ActionResult _RightRaiders() { //当前月份排行榜最高的十条数据 ViewData["CurrentMonthTopTen"] = UserRaidersBll.GetNewestRaiders(); //右侧数据 var otherController = DependencyResolver.Current.GetService <NewsInfoController>(); ViewData["ViewTopNews"] = NewsBll.GetAllPageViewTopNews(); ViewBag.NewsetGameDemo = GameDemoBll.GetNewestGameDemo(); return(PartialView("_RightRaiders")); }
/// <summary> /// 淘福利_个人领的全部帐号 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult DemoAllAccount() { List <DemoViewModel> data = null; if (!string.IsNullOrEmpty(Request["userId"])) { string guid = Request["userId"]; var user = Common.CacheHelper.Get(guid) as PersonalUser; data = GameDemoBll.GetAlreadyNeckAllDemoAccount(user.Id).ToList(); } return(Json(data, JsonRequestBehavior.AllowGet)); }
public ActionResult _RightNews() { //---------------资讯排行--------------------- ViewData["ViewTopNews"] = NewsBll.GetAllPageViewTopNews(); //---------------精彩图文------------------------ ViewBag.WonderfulSeeNews = WonderfulTxtImgBll.LoadEntities(n => true).OrderByDescending(n => n.InTime) .Take(4).AsNoTracking().ToList(); //----------------最赞攻略------------------------ ViewBag.NewestRaiders = UserRaidersBll.GetMostGreatRaiders(); //----------------最新福利-------------- ViewBag.NewsetGameDemo = GameDemoBll.GetNewestGameDemo(); return(PartialView("_RightNews")); }
//试玩第三步 public ActionResult DemoDetail_Step3() { string guid = Request["userId"]; //从分布式缓存拿出来的对象不能进行延迟加载。 var user = Common.CacheHelper.Get(guid) as PersonalUser; int userId = 0; if (user != null) { userId = user.Id; } int gamedemoId = int.Parse(Request["gamedemoId"]); int accountId = int.Parse(Request["accountId"]); var data = GameDemoBll.DemoDetail_Step3(userId, gamedemoId, accountId).ToList(); return(Json(data, JsonRequestBehavior.AllowGet)); }
public ActionResult GetDemoList() { int pageIndex = int.Parse(Request["pageIndex"] ?? "1"); int pageSize = int.Parse(Request["pageSize"] ?? "15"); string gameName = Request["gameName"]; var param = new DemoParam() { PageIndex = pageIndex, PageSize = pageSize, GameName = gameName }; var data = GameDemoBll.GetGameDemo(param); int total = GameDemoBll.GetGameDemoCount(); var NavStr = Common.LaomaPager.ShowPageNavigate(param.PageSize, param.PageIndex, total); var result = new { Data = data, NavStr = NavStr }; return(Json(result, JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { ViewData["smallImg"] = AdvertisementBll.GetAllTypeAdvert("2", 9); ViewData["advert"] = AdvertisementBll.GetAllTypeAdvert("3", 2); ViewBag.IndexBigImg = AdvertisementBll.GetAllTypeAdvert("1", 1); ViewBag.SiYe = AdvertisementBll.GetAllTypeAdvert("4", 1); ViewData["recGame"] = HomePageBll.GetAllTypeHomePage("11", 11); ViewData["joinCpy"] = HomePageBll.GetAllTypeHomePage("12", 13); ViewData["SlideShow"] = HomePageBll.GetAllTypeHomePage("7", 10); ViewData["TenTopArea"] = HomePageBll.GetAllTypeHomePage("10", 10); //网站首页所有新闻类型 ViewData["allTypeNews"] = NewsBll.GetAllNewsIndex(); //开测 ViewData["TestInfo"] = TestBll.TestDataTen(); //最爽礼包 ViewData["NewestCoolPackage"] = PackageBll.NewestCoolPackage(); //最热游戏 ViewData["NewestHotGame"] = HomePageBll.GetAllTypeHomePage("13", 5); // 最强福利 ViewBag.NewsetGameDemo = GameDemoBll.GetNewestGameDemo(); //直播热点 ViewData["DirectHot"] = HomePageBll.GetAllTypeHomePage("5", 1); ViewData["threeDirectHot"] = NewsBll.AccondingTypeGetNews("5"); //手游 ViewData["MobileGame"] = HomePageBll.GetAllTypeHomePage("6", 1); ViewData["threeMobileGame"] = NewsBll.AccondingTypeGetNews("6"); //最赞攻略结合游戏库拿游戏的logo图 ViewData["MostGreatRaiders"] = UserRaidersBll.GetMostGreatRaiders(10); //福利美图 ViewData["NewestIndexRecGirls"] = BeautifulGirlsBll.NewestIndexRecGirls(); //热游排行 ViewBag.InLikeNumHotGame = GameBll.InLikeNumHotGame(); //开服 ViewBag.sevenData = OpenServiceBll.WillSevenDayService(); //资讯排行 ViewBag.LikeNumNews = NewsBll.InLikeNumNews(); ViewBag.RecCpy = CompanyBll.RecCompany(); return(View()); }
public ActionResult DemoRecharge(int gameDemoid, int userId, int accountId, int pay, string memo) { var data = GameDemoBll.DemoRecharge(gameDemoid, userId, accountId, pay, memo); return(Json(data, JsonRequestBehavior.AllowGet)); }
public ActionResult DemoDetails(int id) { var data = GameDemoBll.DemoDetailsFirst(id); return(Json(data, JsonRequestBehavior.AllowGet)); }