public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/json"; var GameCode = string.Empty; var GameZoneID = string.Empty; if (!string.IsNullOrEmpty(context.Request["GameCode"])) { GameCode = context.Request["GameCode"];//游戏编号 } if (!string.IsNullOrEmpty(context.Request["GameZoneID"])) { GameZoneID = context.Request["GameZoneID"];//游戏编号 } GameCode = "100001"; GameZoneID = "100001001"; Response sr = new Response(true); try { //寻龙记 if (GameCode == "100001") { string WebSUrl = WSS.BLL.AllOther.GetWebServiceUrl(GameZoneID); if (WebSUrl.Length > 10) { WebServiceXLJ.WebServiceGame xlj = new WebServiceXLJ.WebServiceGame(); xlj.Url = WebSUrl; string jsonsrequest = context.Request.Form[0].ToString(); xlj.Credentials = System.Net.CredentialCache.DefaultCredentials; xlj.SaveBattleZones(jsonsrequest); sr.Write(); } } } catch (System.Exception e) { sr.Success = false; sr.Msg = e.Message; } sr.Write(); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/json"; var start = 0; var limit = 10; var sort = string.Empty; var dir = string.Empty; var query = string.Empty; var GameCode = string.Empty; var GameZoneID = string.Empty; if (!string.IsNullOrEmpty(context.Request["start"])) { start = int.Parse(context.Request["start"]); } if (!string.IsNullOrEmpty(context.Request["limit"])) { limit = int.Parse(context.Request["limit"]); } if (!string.IsNullOrEmpty(context.Request["sort"])) { sort = context.Request["sort"]; } if (!string.IsNullOrEmpty(context.Request["dir"])) { dir = context.Request["dir"]; } if (!string.IsNullOrEmpty(context.Request["query"])) { query = context.Request["query"]; } if (!string.IsNullOrEmpty(context.Request["GameCode"])) { GameCode = context.Request["GameCode"];//游戏编号 } if (!string.IsNullOrEmpty(context.Request["GameZoneID"])) { GameZoneID = context.Request["GameZoneID"];//游戏编号 } GameCode = "100001"; GameZoneID = "100001001"; string jsons = "{totalCount:0,success:true,data:[]}"; try { //寻龙记 if (GameCode == "100001") { string WebSUrl = System.Configuration.ConfigurationManager.AppSettings["WebserviceGameCoreDB"]; if (WebSUrl.Length > 10) { WebServiceXLJ.WebServiceGame xlj = new WebServiceXLJ.WebServiceGame(); xlj.Url = WebSUrl; xlj.Credentials = System.Net.CredentialCache.DefaultCredentials; jsons = xlj.GetGameServers(); } } } catch (System.Exception ex) { } context.Response.Write(jsons); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/json"; var start = 0; var limit = 10; var sort = string.Empty; var dir = string.Empty; var query = string.Empty; var GameCode = string.Empty; var GameZoneID = string.Empty; if (!string.IsNullOrEmpty(context.Request["start"])) { start = int.Parse(context.Request["start"]); } if (!string.IsNullOrEmpty(context.Request["limit"])) { limit = int.Parse(context.Request["limit"]); } if (!string.IsNullOrEmpty(context.Request["sort"])) { sort = context.Request["sort"]; } if (!string.IsNullOrEmpty(context.Request["dir"])) { dir = context.Request["dir"]; } if (!string.IsNullOrEmpty(context.Request["query"])) { query = context.Request["query"]; } if (!string.IsNullOrEmpty(context.Request["GameCode"])) { GameCode = context.Request["GameCode"];//游戏编号 } if (!string.IsNullOrEmpty(context.Request["GameZoneID"])) { GameZoneID = context.Request["GameZoneID"];//游戏编号 } string jsons = "{totalCount:0,success:true,data:[]}"; if (query.Trim() != "" && query.Trim() != "1<>1") { //寻龙记 if (GameCode == "100001") { string WebSUrl = WSS.BLL.AllOther.GetWebServiceUrl(GameZoneID); if (WebSUrl.Length > 10) { WebServiceXLJ.WebServiceGame xlj = new WebServiceXLJ.WebServiceGame(); xlj.Credentials = System.Net.CredentialCache.DefaultCredentials; xlj.Url = WebSUrl; jsons = xlj.GetGameUsers(query); } } } context.Response.Write(jsons); }