예제 #1
0
        /// <summary>
        /// 添加游戏分数的方法
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string addGetScore(HttpContext context)
        {
            Json   jsonResult = new Json();
            string gameid     = context.Request["gameid"];
            string userid     = context.Request["userid"];
            string juid       = context.Request["juid"];
            string score      = context.Request["score"];
            string flag       = context.Request["flag"];

            string beinum    = context.Request["beinum"];
            string realscore = context.Request["realscore"];
            string lunnum    = context.Request["lunnum"];
            string biaonum   = context.Request["biaonum"];
            string biaopos   = context.Request["biaopos"];

            if (string.IsNullOrEmpty(biaopos))
            {
                biaopos = "0";
            }
            int result = ms.addMatchInfo(gameid, userid, score, juid, flag, beinum, realscore, lunnum, biaonum, biaopos);

            if (result > 0)
            {
                jsonResult.Success = true;
                jsonResult.Msg     = "添加成功";
            }
            else
            {
                jsonResult.Success = false;
                jsonResult.Msg     = "添加失败";
            }
            string strJson = JsonConvert.SerializeObject(jsonResult);

            return(strJson);
        }