Пример #1
0
        private string getGameTpyeList(HttpContext context)
        {
            Json      jsonResult = new Json();
            string    typeName   = context.Request["typeName"];
            string    limit      = context.Request["limit"];
            string    page       = context.Request["page"];
            DataTable dt         = ms.getGameTypeList(typeName, limit, page);
            int       count      = ms.getGameTypeListNum(typeName);

            if (dt == null)
            {
                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);
        }