protected void Page_Load(object sender, EventArgs e) { //查询联盟 int leagueId = 0; GameSBall game = new GameSBall(); if (Request["lm"] != null && int.TryParse(Request["lm"], out leagueId)) { string strLeague = game.GetTeamList(leagueId); Response.Clear(); Response.Write(strLeague); Response.End(); } //赛事批量操作 int actionId = 0; if (Request["ai"] != null && int.TryParse(Request["ai"], out actionId) && !string.IsNullOrEmpty(Request["il"])) { string[] idList = Request["il"].Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); int HasBets = 0; if (actionId == 9) { HasBets = game.GetBetCount(idList); } if (HasBets > 0) //垃圾桶中要删除资料有注单 { Response.Clear(); Response.Write("0011"); Response.End(); } else { string result = game.SetGameStatus(this.Request["pt"], actionId, idList); Response.Clear(); Response.Write(result); Response.End(); } } //修改赔率 int nid = 0; decimal nValue = 0; if (int.TryParse(this.Request["tid"], out nid) && !String.IsNullOrEmpty(Request["tFiled"]) && decimal.TryParse(Request["tValue"], out nValue)) { string result = game.SetRate(nid, this.Request["tFiled"], nValue); Response.Clear(); Response.Write(result); Response.End(); } }
protected void Page_Load(object sender, EventArgs e) { string ballType = this.Request["bt"]; string sortId = this.Request["si"]; string accInDate = this.Request["ad"]; string selectAlliance = this.Request["sa"]; int playType = -1; int pageSize = 10; int pageIndex = 1; int courtType = -1; int isBet = -1; if (string.IsNullOrEmpty(ballType)) { return; } if (string.IsNullOrEmpty(sortId)) { return; } if (accInDate == null) { return; } if (selectAlliance == null) { return; } if (!int.TryParse(this.Request["ct"], out courtType)) { return; } if (!int.TryParse(this.Request["pt"], out playType)) { return; } if (!int.TryParse(this.Request["ps"], out pageSize)) { return; } if (!int.TryParse(this.Request["pi"], out pageIndex)) { return; } if (!int.TryParse(this.Request["ib"], out isBet)) { return; } List <int> selectAllianceList = new List <int>(); foreach (string str in selectAlliance.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { selectAllianceList.Add(Convert.ToInt32(str)); } List <KFB_LMGL> allAllianceList = new List <KFB_LMGL>(); int recordCount = 0; //比赛资料 string accOutDate = ""; List <List <object> > lm = new List <List <object> >(); GameSBall objGame = new GameSBall(); List <object[]> gameList = objGame.GetCompanyGameList(ballType, selectAllianceList, courtType, sortId, isBet, accInDate, playType, pageIndex, pageSize, out recordCount, out allAllianceList, out accOutDate); List <DateTime> zwrqlist = new List <DateTime>(); if (playType == 0) //足球早盘 { zwrqlist = objGame.GetBreakfaseZQ(Comm.GetZWRQ().ToString("yyyy/MM/dd")); } else if (playType == 10) { zwrqlist = objGame.GetRecycleRQ(ballType); } JavaScriptSerializer ser = new JavaScriptSerializer(); string output = ""; //0早餐,1單式,2走地,3過關,4波胆,5半全场,6入球数,7已开赛,8过账前的历史比赛,9过账后的历史比赛, //n_gsty 0早餐 1单式 2滚球 3过关 4波胆 5单双/入球数 6半全场 switch (playType) { case 0: //足球早餐 output = "[" + ser.Serialize(gameList) + "," + ser.Serialize(allAllianceList) + "," + recordCount + ",\"" + accOutDate + "\"," + ser.Serialize(zwrqlist) + "]"; break; case 8: //已计算 output = "[" + ser.Serialize(gameList) + "," + ser.Serialize(allAllianceList) + "," + recordCount + ",\"" + accOutDate + "\"," + ser.Serialize(Comm.getZWDate()) + "]"; break; case 9: //历史比赛 output = "[" + ser.Serialize(gameList) + "," + ser.Serialize(allAllianceList) + "," + recordCount + ",\"" + accOutDate + "\"," + ser.Serialize(Comm.getZWDate()) + "]"; break; case 10: //垃圾桶 output = "[" + ser.Serialize(gameList) + "," + ser.Serialize(allAllianceList) + "," + recordCount + ",\"" + accOutDate + "\"," + ser.Serialize(zwrqlist) + "]"; break; default: output = "[" + ser.Serialize(gameList) + "," + ser.Serialize(allAllianceList) + "," + recordCount + ",\"" + accOutDate + "\"]"; break; } Response.Write(output); Response.End(); }