Ejemplo n.º 1
0
        /// <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);
        }