private string toEndGame(HttpContext context) { Json jsonResult = new Json(); string username = context.Request["username"]; int result = ms.toEndGame(username); if (result > 0) { jsonResult.Success = true; } else { jsonResult.Success = false; } string strJson = JsonConvert.SerializeObject(jsonResult); return(strJson); }