예제 #1
0
        public void GetDataCount(HttpContext context, string Code)
        {
            string   WhereStr = context.Request["WhereStr"];
            int      UserId   = BBRequest.GetUserId();
            GameUser gu       = new GameUser();

            switch (Code)
            {
            case "News":
                context.Response.Write(nm.GetNewsCount(WhereStr));
                break;

            case "Game":
                context.Response.Write(gm.GetGamesCount(WhereStr));
                break;

            case "Server":
                context.Response.Write(sm.GetServerCount(WhereStr));
                break;

            case "Card":
                context.Response.Write(cm.GetCardCount(WhereStr));
                break;

            case "Order":
                context.Response.Write(om.GetOrderCount(WhereStr));
                break;

            case "SourceChange":
                context.Response.Write(scm.GetSourceChangeCount(WhereStr));
                break;

            case "GameUser":
                context.Response.Write(gum.GetGameUserCount(WhereStr));
                break;

            case "MasterLog":
                context.Response.Write(mm.GetMasterLogCount(WhereStr));
                break;

            case "Links":
                context.Response.Write(lm.GetLinksCount(WhereStr));
                break;

            case "CardLog":
                context.Response.Write(cm.GetCardLogCount(WhereStr));
                break;

            case "Master":
                context.Response.Write(mm.GetMasterCount(WhereStr));
                break;

            case "SysMsg":
                context.Response.Write(smm.GetSysMsgCount(BBRequest.GetUserId()));
                break;

            case "PayHistory1":
                gu       = gum.GetGameUser(UserId);
                WhereStr = "where UserName='******'";
                context.Response.Write(om.GetOrderCount(WhereStr));
                break;

            case "PayHistory2":
                gu       = gum.GetGameUser(UserId);
                WhereStr = "where UserName='******' and State=2";
                context.Response.Write(om.GetOrderCount(WhereStr));
                break;

            case "InitSpread":
                string[] re    = WhereStr.Split('|');
                string   Coded = context.Request["Code"];
                if (re.Length == 4)
                {
                    context.Response.Write(om.GetSpreadCount(int.Parse(re[3]), false));
                }
                else
                {
                    if (Coded == "All")
                    {
                        context.Response.Write(om.GetSpreadCount(UserId, false));
                    }
                    else
                    {
                        context.Response.Write(om.GetSpreadCount(UserId, true));
                    }
                }
                break;

            case "SpreadPay":
                context.Response.Write(om.GetSpreadPayCount(UserId, WhereStr));
                break;

            case "SpreadGame":
                context.Response.Write(om.GetSpreadGameCount(UserId, WhereStr));
                break;

            case "GetMasterRoleCount":
                context.Response.Write(mm.GetMasterRoleCount(WhereStr));
                break;

            case "GetLockCount":
                context.Response.Write(Lkm.GetAllLockCount(WhereStr));
                break;

            default:
                break;
            }
        }