public Message AgentLogonNew(AgentInfo user)
        {
            Message message = aideAccountsData.AgentLogonNew(user);

            if (message.Success)
            {
                AgentInfo agentInfo = message.EntityList[0] as AgentInfo;
                agentInfo.Pwd = user.Pwd;
                List <AgentMenu> list = new List <AgentMenu>();
                if (agentInfo.IsClient == 2)
                {
                    AgentMenu agentMenu = new AgentMenu();
                    agentMenu.prefixUrl = "Recharge";
                    agentMenu.key       = "充值记录";
                    list.Add(agentMenu);
                    AgentMenu agentMenu2 = new AgentMenu();
                    agentMenu2.prefixUrl = "Present";
                    agentMenu2.key       = "赠送记录";
                    list.Add(agentMenu2);
                }
                else
                {
                    AgentMenu agentMenu3 = new AgentMenu();
                    agentMenu3.prefixUrl = "New";
                    agentMenu3.key       = "代理信息";
                    list.Add(agentMenu3);
                    if (agentInfo.IsClient == 1)
                    {
                        AgentMenu agentMenu4 = new AgentMenu();
                        agentMenu4.prefixUrl = "Pay";
                        agentMenu4.key       = "订单充值";
                        list.Add(agentMenu4);
                        AgentMenu agentMenu5 = new AgentMenu();
                        agentMenu5.prefixUrl = "PayOrder";
                        agentMenu5.key       = "订单充值记录";
                        list.Add(agentMenu5);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 1))
                    {
                        AgentMenu agentMenu6 = new AgentMenu();
                        agentMenu6.prefixUrl = "Recharges";
                        agentMenu6.key       = "玩家充值记录";
                        list.Add(agentMenu6);
                        AgentMenu agentMenu7 = new AgentMenu();
                        agentMenu7.prefixUrl = "Payunline";
                        agentMenu7.key       = "玩家线下充值记录";
                        list.Add(agentMenu7);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 2))
                    {
                        AgentMenu agentMenu8 = new AgentMenu();
                        agentMenu8.prefixUrl = "GameChart";
                        agentMenu8.key       = "玩家游戏报表";
                        list.Add(agentMenu8);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 4))
                    {
                        AgentMenu agentMenu9 = new AgentMenu();
                        agentMenu9.prefixUrl = "Balance";
                        agentMenu9.key       = "玩家提现记录";
                        list.Add(agentMenu9);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 8))
                    {
                        AgentMenu agentMenu10 = new AgentMenu();
                        agentMenu10.prefixUrl = "AccountScoreList";
                        agentMenu10.key       = "玩家总输赢";
                        list.Add(agentMenu10);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 16))
                    {
                        AgentMenu agentMenu11 = new AgentMenu();
                        agentMenu11.prefixUrl = "Notice";
                        agentMenu11.key       = "代理公告";
                        list.Add(agentMenu11);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 32))
                    {
                        AgentMenu agentMenu12 = new AgentMenu();
                        agentMenu12.prefixUrl = "Revise";
                        agentMenu12.key       = "资料修改";
                        list.Add(agentMenu12);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 64))
                    {
                        AgentMenu agentMenu13 = new AgentMenu();
                        agentMenu13.prefixUrl = "Game";
                        agentMenu13.key       = "玩家管理";
                        list.Add(agentMenu13);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 128))
                    {
                        AgentMenu agentMenu14 = new AgentMenu();
                        agentMenu14.prefixUrl = "Agent";
                        agentMenu14.key       = "代理管理";
                        list.Add(agentMenu14);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 256))
                    {
                        AgentMenu agentMenu15 = new AgentMenu();
                        agentMenu15.prefixUrl = "Baobiao";
                        agentMenu15.key       = "我的报表";
                        list.Add(agentMenu15);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 512))
                    {
                        AgentMenu agentMenu16 = new AgentMenu();
                        agentMenu16.prefixUrl = "Recordcs";
                        agentMenu16.key       = "我的抽水记录";
                        list.Add(agentMenu16);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 1024))
                    {
                        AgentMenu agentMenu17 = new AgentMenu();
                        agentMenu17.prefixUrl = "Change";
                        agentMenu17.key       = "金币变化记录";
                        list.Add(agentMenu17);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 2048))
                    {
                        AgentMenu agentMenu18 = new AgentMenu();
                        agentMenu18.prefixUrl = "Agentwin";
                        agentMenu18.key       = "代理输赢情况";
                        list.Add(agentMenu18);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 4096))
                    {
                        AgentMenu agentMenu19 = new AgentMenu();
                        agentMenu19.prefixUrl = "Gamewin";
                        agentMenu19.key       = "玩家输赢情况";
                        list.Add(agentMenu19);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 8192))
                    {
                        AgentMenu agentMenu20 = new AgentMenu();
                        agentMenu20.prefixUrl = "Money";
                        agentMenu20.key       = "提款";
                        list.Add(agentMenu20);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 16384))
                    {
                        AgentMenu agentMenu21 = new AgentMenu();
                        agentMenu21.prefixUrl = "DuiHuanRecord";
                        agentMenu21.key       = "提款记录";
                        list.Add(agentMenu21);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 32768))
                    {
                        AgentMenu agentMenu22 = new AgentMenu();
                        agentMenu22.prefixUrl = "PayReport";
                        agentMenu22.key       = "充值提成报表";
                        list.Add(agentMenu22);
                    }
                    if (TypeUtil.AgentRight(agentInfo.QueryRight, 65536))
                    {
                        AgentMenu agentMenu23 = new AgentMenu();
                        agentMenu23.prefixUrl = "OnlinePayer";
                        agentMenu23.key       = "在线玩家";
                        list.Add(agentMenu23);
                    }
                    agentInfo.menus = list;
                    AdminCookie.SetAgentCookieNew(agentInfo);
                }
            }
            return(message);
        }