/// <summary> /// 获取用户已经选择的游戏 /// </summary> /// <returns></returns> private string getChooseList(HttpContext context) { Json jsonResult = new Json(); string gamenameid = context.Request["gamenameid"]; string flag = context.Request["flag"]; string username = context.Request["username"]; string limit = context.Request["limit"]; string page = context.Request["page"]; DataTable dt = ms.getChooseList(gamenameid, flag, username, page, limit); int count = ms.getChooseListNum(gamenameid, flag, username); if (dt == null || dt.Rows.Count == 0) { jsonResult.Success = false; jsonResult.count = count; jsonResult.code = 400; } else { jsonResult.Success = true; jsonResult.data = dt; jsonResult.count = count; jsonResult.code = 0; } string strJson = JsonConvert.SerializeObject(jsonResult); return(strJson); }
/// <summary> /// 获取用户已经选择的游戏 /// </summary> /// <returns></returns> private string getChooseList(HttpContext context) { Json jsonResult = new Json(); string gamenameid = context.Request["gamenameid"]; string flag = context.Request["flag"]; DataTable dt = ms.getChooseList(gamenameid, flag); if (dt == null) { jsonResult.Success = false; jsonResult.RowCount = dt.Rows.Count; } else { jsonResult.Success = true; jsonResult.Result = dt; jsonResult.RowCount = 0; } string strJson = JsonConvert.SerializeObject(jsonResult); return(strJson); }