Exemplo n.º 1
0
        public string InsertInfo(string userid, string password, string casino, string group, string address, string address2, string cookie, string isquzhi, string enable, string ip)
        {
            if (Session[Util.ProjectConfig.ADMINUSER] == null)
            {
                return("");
            }

            admin.PageBase page = new admin.PageBase();
            DateTime       time = DateTime.Now;
            string         i    = AccountManager.getInfo(userid);

            if (i != "0")
            {
                return("-1");
            }
            Account account = new Account();

            account.Userid       = userid;
            account.Password     = password;
            account.Casino       = int.Parse(casino);
            account.Group1       = int.Parse(group);
            account.Address      = address;
            account.Time         = time;
            account.Address2     = address2;
            account.Cookie       = cookie;
            account.Isquzhi      = byte.Parse(isquzhi);
            account.Enable       = int.Parse(enable);
            account.Operat       = page.CurrentManager.ManagerId;
            account.Operatortime = time.ToString();
            account.Operatorip   = ip;
            return(AccountManager.AddAccount(account).ToString());
        }
        public string save222(string cn, string tw, string en, string th, string vn, string disu, string disa, string winu, string wina)
        {
            if (Session[Util.ProjectConfig.ADMINUSER] == null)
            {
                return("");
            }

            admin.PageBase page = new admin.PageBase();
            DateTime       time = DateTime.Now;
            Notice         no   = new Notice();

            no.Createdate   = time;
            no.Createuser   = page.CurrentManager.ManagerId;
            no.Displayagent = disa;
            no.Displayuser  = disu;
            no.Msgcn        = cn;
            no.Msgen        = en;
            no.Msgth        = th;
            no.Msgtw        = tw;
            no.Msgvn        = vn;
            no.Windowagent  = wina;
            no.Windowuser   = winu;
            string reval = NoticeManager.AddNotice(no).ToString();

            if (reval == "True")
            {
                AddUpdatematches();
            }
            return(reval);
        }
Exemplo n.º 3
0
        public string Insert(string name, string agentName, string pwd, string casino, string cookie, string addr, string addr2, string isEnable, string ip)
        {
            if (Session[Util.ProjectConfig.ADMINUSER] == null)
            {
                return("no");
            }
            admin.PageBase page = new admin.PageBase();
            string         i    = AccountManager.getInfo(name);

            if (i != "0")
            {
                return("-1");  //已存在该帐号名称
            }
            AgentAccount agentAcc = new AgentAccount();

            agentAcc.Name          = name;
            agentAcc.AgentName     = agentName;
            agentAcc.Password      = pwd;
            agentAcc.Casino        = casino;
            agentAcc.Cookie        = cookie;
            agentAcc.Address       = addr;
            agentAcc.Address2      = addr2;
            agentAcc.IsEnable      = isEnable;
            agentAcc.Operator      = page.CurrentManager.ManagerId;
            agentAcc.OperationTime = DateTime.Now;
            agentAcc.IP            = ip;
            return(BLL.AgentAccountManager.Insert(agentAcc) ? "yes" : "no");
        }
        public string AddManager(string ManagerId, string PassWord, int RoleId, int Enable)
        {
            if (Session[Util.ProjectConfig.ADMINUSER] == null)
            {
                return("");
            }

            //帐号是否存在
            admin.PageBase pageBase       = new admin.PageBase();
            ManagerService managerService = new ManagerService();
            Manager        info1          = managerService.GetManagerByManagerId(ManagerId);

            if (info1 != null)
            {
                return("帐号已存在");
            }

            //Manager info = (Manager)Session[Util.ProjectConfig.ADMINUSER];
            Manager managerModel = new Manager();

            managerModel.ManagerId  = ManagerId;
            managerModel.PassWord   = PassWord;
            managerModel.RoleId     = RoleId;
            managerModel.CreateDate = DateTime.Now;
            managerModel.UpdateDate = DateTime.Now;
            managerModel.CreateUser = pageBase.CurrentManager.ManagerId;
            managerModel.IP         = Util.RequestHelper.GetIP();
            managerModel.Enable     = Enable;

            string jsonStr = "";
            bool   reval   = ManagerManager.AddManager(managerModel);

            if (reval)
            {
                Manager info = ManagerManager.GetManagerByManagerId(ManagerId, PassWord);
                jsonStr = ManagerManager.ManagerToJson(info);
            }
            else
            {
                jsonStr = "none";
            }

            return(jsonStr);
        }
Exemplo n.º 5
0
        public string InsertInfo(string aname, string casino, string userid, string password, string agent, string websitepossess, string selfpossess, string commission,
                                 string multiple, string zemo, string group, string address, string address2, string cookie, string isquzhi, string enable, string ip)
        {
            if (Session[Util.ProjectConfig.ADMINUSER] == null)
            {
                return("");
            }

            admin.PageBase page = new admin.PageBase();
            DateTime       time = DateTime.Now;
            string         i    = BetaccountManager.getCount(userid);

            if (i != "0")
            {
                return("-1");
            }
            Betaccount bet = new Betaccount();

            bet.Casino         = int.Parse(casino);
            bet.Userid         = userid;
            bet.Password       = password;
            bet.Agent          = agent;
            bet.WebsitePossess = decimal.Parse(websitepossess);
            bet.SelfPossess    = decimal.Parse(selfpossess);
            bet.Commission     = decimal.Parse(commission);
            bet.Multiple       = decimal.Parse(multiple);
            bet.Zemo           = zemo;
            bet.Group1         = int.Parse(group);
            bet.Address        = address;
            bet.Address2       = address2;
            bet.Cookie         = cookie;
            bet.Isquzhi        = byte.Parse(isquzhi);
            bet.Enable         = byte.Parse(enable);
            bet.Time           = time;
            bet.Operator       = page.CurrentManager.ManagerId;
            bet.Operatorip     = ip;
            bet.Operatortime   = time;
            bet.Anothername    = aname;
            return(BetaccountManager.AddBetaccount(bet).ToString());
        }
Exemplo n.º 6
0
        public bool Update(string id, string name, string agentName, string pwd, string casino, string cookie, string addr, string addr2, string isEnable, string ip)
        {
            if (Session[Util.ProjectConfig.ADMINUSER] == null)
            {
                return(false);
            }
            admin.PageBase page     = new admin.PageBase();
            AgentAccount   agentAcc = new AgentAccount();

            agentAcc.ID            = int.Parse(id);
            agentAcc.Name          = name;
            agentAcc.AgentName     = agentName;
            agentAcc.Password      = pwd;
            agentAcc.Casino        = casino;
            agentAcc.Cookie        = cookie;
            agentAcc.Address       = addr;
            agentAcc.Address2      = addr2;
            agentAcc.IsEnable      = isEnable;
            agentAcc.Operator      = page.CurrentManager.ManagerId;
            agentAcc.OperationTime = DateTime.Now;
            agentAcc.IP            = ip;
            return(BLL.AgentAccountManager.Update(agentAcc));
        }
Exemplo n.º 7
0
        public string UpdateInfo1(string id, string casino, string userid, string password, string agent, string websitepossess, string selfpossess, string commission,
                                  string multiple, string zemo, string group, string address, string address2, string cookie, string isquzhi, string enable, string ip)
        {
            if (Session[Util.ProjectConfig.ADMINUSER] == null)
            {
                return("");
            }

            admin.PageBase page = new admin.PageBase();
            DateTime       time = DateTime.Now;
            /** 修改之前的信息插入修改日志表 **/
            Betaccountmax bet1 = BetaccountmaxManager.GetBetaccountByID(int.Parse(id))[0];

            Betaccountlog betlog = new Betaccountlog();

            betlog.Casino         = bet1.Casino;
            betlog.Userid         = bet1.Userid;
            betlog.Password       = bet1.Password;
            betlog.Agent          = bet1.Agent;
            betlog.WebsitePossess = bet1.WebsitePossess;
            betlog.SelfPossess    = bet1.SelfPossess;
            betlog.Commission     = bet1.Commission;
            betlog.Multiple       = bet1.Multiple;
            betlog.Zemo           = bet1.Zemo;
            betlog.Group1         = bet1.Group1;
            betlog.Address        = bet1.Address;
            betlog.Address2       = bet1.Address2;
            betlog.Cookie         = bet1.Cookie;
            betlog.Isquzhi        = bet1.Isquzhi;
            betlog.Enable         = bet1.Enable;
            betlog.Time           = bet1.Time;
            betlog.Operator       = bet1.Operator;
            betlog.Operatorip     = bet1.Operatorip;
            betlog.Operatortime   = bet1.Operatortime;
            BetaccountlogManager.AddBetaccountlog(betlog);
            /** 插入完毕 **/

            /** 修改信息 **/
            Betaccountmax bet = new Betaccountmax();

            bet.Id             = int.Parse(id);
            bet.Casino         = int.Parse(casino);
            bet.Userid         = userid;
            bet.Password       = password;
            bet.Agent          = agent;
            bet.WebsitePossess = decimal.Parse(websitepossess);
            bet.SelfPossess    = decimal.Parse(selfpossess);
            bet.Commission     = decimal.Parse(commission);
            bet.Multiple       = decimal.Parse(multiple);
            bet.Zemo           = zemo;
            bet.Group1         = int.Parse(group);
            bet.Address        = address;
            bet.Address2       = address2;
            bet.Cookie         = cookie;
            bet.Isquzhi        = byte.Parse(isquzhi);
            bet.Enable         = byte.Parse(enable);
            bet.Time           = time;
            bet.Operator       = page.CurrentManager.ManagerId;
            bet.Operatorip     = ip;
            bet.Operatortime   = time;
            return(BetaccountmaxManager.UpdateBetaccountmax(bet).ToString());
        }