示例#1
0
        /// <summary>
        /// 修改代理信息接口
        /// </summary>
        /// <param name="address"></param>
        /// <param name="phone"></param>
        /// <param name="qq"></param>
        private static void UpdateAgentInfo(string address, string phone, string qq)
        {
            if (string.IsNullOrEmpty(address) || string.IsNullOrEmpty(phone) ||
                string.IsNullOrEmpty(qq))
            {
                _ajv.code = (int)ApiCode.VertyParamErrorCode;
                _ajv.msg  = string.Format(EnumHelper.GetDesc(ApiCode.VertyParamErrorCode),
                                          " address、phone、qq 缺失");
                return;
            }
            if (!Validate.IsMobileCode(phone))
            {
                _ajv.msg = "抱歉,联系电话格式不正确";
                return;
            }
            AccountsAgentInfo uiAgent = new AccountsAgentInfo()
            {
                UserID         = UserId,
                ContactAddress = address,
                ContactPhone   = phone,
                QQAccount      = qq
            };
            int uiResult = FacadeManage.aideAccountsFacade.UpdateAgentInfo(uiAgent);

            if (uiResult > 0)
            {
                _ajv.SetValidDataValue(true);
                _ajv.msg = "修改代理信息成功";
            }
            else
            {
                _ajv.msg = "修改代理信息失败";
            }
        }
示例#2
0
        /// <summary>
        /// 数据保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            AuthUserOperationPermission(Permission.Add);
            string agentNote    = CtrlHelper.GetText(txtAgentNote);
            string compellation = CtrlHelper.GetText(txtCompellation);
            string address      = CtrlHelper.GetText(txtContactAddress);
            string phone        = CtrlHelper.GetText(txtContactPhone);
            string domain       = CtrlHelper.GetText(txtDomain);
            int    gameid       = CtrlHelper.GetInt(txtGameID, 0);
            int    pgameid      = CtrlHelper.GetInt(txtParentGameID, 0);
            string qqaccount    = CtrlHelper.GetText(txtQQAccount);
            string wxnickname   = CtrlHelper.GetText(txtWCNickName);
            int    level        = Convert.ToInt32(ddlLevel.SelectedValue);

            //判断用户是否存在
            AccountsInfo info = FacadeManage.aideAccountsFacade.GetAccountInfoByGameId(gameid);

            if (info == null || info.UserID <= 0)
            {
                MessageBox("游戏ID无效,请重新输入");
                return;
            }
            if (!string.IsNullOrEmpty(info.Compellation) && !info.Compellation.Equals(compellation))
            {
                MessageBox("真实姓名与实名认证资料不符");
                return;
            }
            AccountsAgentInfo agent = new AccountsAgentInfo
            {
                AgentDomain    = domain,
                AgentLevel     = Convert.ToByte(level),
                AgentNote      = agentNote,
                Compellation   = compellation,
                ContactAddress = address,
                ContactPhone   = phone,
                QQAccount      = qqaccount,
                WCNickName     = wxnickname,
                UserID         = info.UserID
            };

            Message msg = FacadeManage.aideAccountsFacade.InsertAgentUser(agent, pgameid);

            if (msg.Success)
            {
                MessageBoxCloseRef(msg.Content);
            }
            else
            {
                MessageBox(msg.Content);
            }
        }
示例#3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Card.Site.Menu = 0;
     if (!IsPostBack)
     {
         AccountsAgentInfo agent = FacadeManage.aideAccountsFacade.GetAccountsAgentInfoByAgentID(userTicket.AgentID);
         if (agent != null)
         {
             CtrlHelper.SetText(txtAddress, agent.ContactAddress);
             CtrlHelper.SetText(txtPhone, agent.ContactPhone);
             CtrlHelper.SetText(txtQQAccount, agent.QQAccount);
         }
     }
 }
示例#4
0
        /// <summary>
        /// 数据保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            AuthUserOperationPermission(Permission.Edit);
            if (IntParam > 0)
            {
                AccountsAgentInfo info = FacadeManage.aideAccountsFacade.GetAccountsAgentInfo(IntParam);
                if (info != null)
                {
                    info.AgentNote      = CtrlHelper.GetText(txtAgentNote);
                    info.Compellation   = CtrlHelper.GetText(txtCompellation);
                    info.ContactAddress = CtrlHelper.GetText(txtContactAddress);
                    info.ContactPhone   = CtrlHelper.GetText(txtContactPhone);
                    info.AgentDomain    = CtrlHelper.GetText(txtDomain);
                    info.QQAccount      = CtrlHelper.GetText(txtQQAccount);
                    info.WCNickName     = CtrlHelper.GetText(txtWCNickName);
                    info.AgentLevel     = Convert.ToByte(ddlLevel.SelectedValue);

                    AccountsInfo accounts = FacadeManage.aideAccountsFacade.GetAccountInfoByUserId(info.UserID);
                    if (accounts == null || accounts.UserID <= 0)
                    {
                        MessageBox("代理信息异常,请联系管理员");
                        return;
                    }
                    if (!string.IsNullOrEmpty(accounts.Compellation) && !accounts.Compellation.Equals(info.Compellation))
                    {
                        MessageBox("真实姓名与实名认证资料不符");
                        return;
                    }
                    if (!string.IsNullOrEmpty(accounts.NickName) && !accounts.NickName.Equals(info.WCNickName))
                    {
                        MessageBox("微信昵称与真实昵称不符");
                        return;
                    }

                    int result = FacadeManage.aideAccountsFacade.UpdateAgentUser(info);
                    if (result > 0)
                    {
                        MessageBoxCloseRef("修改成功");
                    }
                    else
                    {
                        MessageBox("修改失败");
                    }
                }
            }
        }
示例#5
0
        /// <summary>
        /// 保存修改
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            //获取修改数据
            string phone     = CtrlHelper.GetText(txtPhone);
            string address   = CtrlHelper.GetText(txtAddress);
            string qqaccount = CtrlHelper.GetText(txtQQAccount);

            //数据验证
            if (string.IsNullOrEmpty(phone))
            {
                ShowInfo("抱歉,手机号码不能为空");
                return;
            }
            if (string.IsNullOrEmpty(address))
            {
                ShowInfo("抱歉,联系地址不能为空");
                return;
            }
            if (string.IsNullOrEmpty(qqaccount))
            {
                ShowInfo("抱歉,QQ账号不能为空");
                return;
            }

            //执行修改
            AccountsAgentInfo agent = new AccountsAgentInfo();

            agent.ContactAddress = address;
            agent.ContactPhone   = phone;
            agent.QQAccount      = qqaccount;
            agent.UserID         = userTicket.UserID;

            int result = FacadeManage.aideAccountsFacade.UpdateAgentInfo(agent);

            if (result > 0)
            {
                Response.Redirect("/Card/Success.aspx?t=1002");
            }
            else
            {
                ShowInfo("抱歉,修改失败,请稍后重试");
            }
        }
示例#6
0
        private static void GetUnderDetail(HttpContext context)
        {
            AjaxJsonValid ajv = new AjaxJsonValid();

            //判断登录
            UserTicketInfo uti = Fetch.GetUserCookie();

            if (uti == null || uti.UserID <= 0)
            {
                ajv.code = 0;
                ajv.msg  = "登录已失效,请重新打开页面";
                context.Response.Write(ajv.SerializeToJson());
                return;
            }

            int          userid = GameRequest.GetQueryInt("userid", 0);
            AccountsInfo ai     = FacadeManage.aideAccountsFacade.GetAccountsInfoByUserID(userid);

            if (ai.AgentID > 0)
            {
                AccountsAgentInfo aai         = FacadeManage.aideAccountsFacade.GetAccountsAgentInfoByAgentID(ai.AgentID);
                UnderDetail       underDetail = new UnderDetail()
                {
                    UserID         = ai.UserID,
                    GameID         = ai.GameID,
                    NickName       = ai.NickName,
                    Compellation   = aai.Compellation,
                    QQAccount      = aai.QQAccount,
                    ContactAddress = aai.ContactAddress,
                    ContactPhone   = aai.ContactPhone,
                    AgentID        = ai.AgentID,
                    Diamond        = FacadeManage.aideTreasureFacade.GetUserCurrency(ai.UserID)?.Diamond ?? 0
                };
                ajv.SetDataItem("info", underDetail.ToString());
                ajv.SetValidDataValue(true);
            }

            context.Response.Write(ajv.SerializeToJson());
        }
示例#7
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (IntParam > 0)
                {
                    AccountsAgentInfo info = FacadeManage.aideAccountsFacade.GetAccountsAgentInfo(IntParam);
                    if (info != null)
                    {
                        AccountsInfo accounts = FacadeManage.aideAccountsFacade.GetAccountInfoByUserId(info.UserID);

                        CtrlHelper.SetText(txtAgentNote, info.AgentNote);
                        CtrlHelper.SetText(txtCompellation, info.Compellation);
                        CtrlHelper.SetText(txtContactAddress, info.ContactAddress);
                        CtrlHelper.SetText(txtContactPhone, info.ContactPhone);
                        CtrlHelper.SetText(txtDomain, info.AgentDomain);
                        CtrlHelper.SetText(txtQQAccount, info.QQAccount);
                        CtrlHelper.SetText(txtWCNickName, accounts.NickName);
                        ddlLevel.SelectedValue = info.AgentLevel.ToString();
                    }
                }
            }
        }
示例#8
0
        /// <summary>
        /// 保存修改
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int    gameid         = CtrlHelper.GetInt(txtGameID, 0);
            string Compellation   = CtrlHelper.GetText(txtCompellation);
            string QQAccount      = CtrlHelper.GetText(txtQQAccount);
            string WCNickName     = CtrlHelper.GetText(txtWCNickName);
            string ContactPhone   = CtrlHelper.GetText(txtContactPhone);
            string ContactAddress = CtrlHelper.GetText(txtContactAddress);
            string AgentDomain    = CtrlHelper.GetText(txtAgentDomain);
            string AgentNote      = CtrlHelper.GetText(txtAgentNote);

            if (gameid <= 0)
            {
                ShowInfo("抱歉,添加代理游戏ID不能为空");
                return;
            }
            if (string.IsNullOrEmpty(Compellation))
            {
                ShowInfo("抱歉,真实姓名不能为空");
                return;
            }
            if (string.IsNullOrEmpty(QQAccount))
            {
                ShowInfo("抱歉,QQ账号不能为空");
                return;
            }
            if (string.IsNullOrEmpty(WCNickName))
            {
                ShowInfo("抱歉,微信昵称不能为空");
                return;
            }
            if (string.IsNullOrEmpty(ContactPhone))
            {
                ShowInfo("抱歉,联系电话不能为空");
                return;
            }
            if (!Utils.Validate.IsMobileCode(ContactPhone))
            {
                ShowInfo("抱歉,联系电话格式不正确");
                return;
            }
            if (string.IsNullOrEmpty(ContactAddress))
            {
                ShowInfo("抱歉,联系地址不能为空");
                return;
            }
            if (string.IsNullOrEmpty(AgentDomain))
            {
                ShowInfo("抱歉,代理域名不能为空");
                return;
            }

            AccountsInfo account = FacadeManage.aideAccountsFacade.GetAccountsInfoByGameID(gameid);

            if (account == null)
            {
                ShowInfo("抱歉,添加代理异常,请稍后重试");
                return;
            }
            if (!string.IsNullOrEmpty(account.Compellation) && !account.Compellation.Equals(Compellation))
            {
                ShowInfo("抱歉,真实姓名与实名认证不一致");
                return;
            }
            if (!account.NickName.Equals(WCNickName))
            {
                ShowInfo("抱歉,微信昵称与真实昵称不一致");
                return;
            }

            AccountsAgentInfo info = new AccountsAgentInfo();

            info.AgentDomain    = AgentDomain;
            info.AgentNote      = AgentNote;
            info.Compellation   = Compellation;
            info.ContactAddress = ContactAddress;
            info.ContactPhone   = ContactPhone;
            info.QQAccount      = QQAccount;
            info.WCNickName     = WCNickName;

            Message msg = FacadeManage.aideAccountsFacade.InsertAgentUser(userTicket.UserID, info, gameid);

            if (msg.Success)
            {
                Response.Redirect("/Card/Success.aspx?t=1001");
            }
            else
            {
                ShowInfo(msg.Content);
            }
        }
示例#9
0
 /// <summary>
 /// 修改代理信息
 /// </summary>
 /// <returns></returns>
 public int UpdateAgentInfo(AccountsAgentInfo agent)
 {
     return(accountsData.UpdateAgentInfo(agent));
 }
示例#10
0
 /// <summary>
 /// 添加代理信息
 /// </summary>
 /// <param name="userid">父级代理用户标识</param>
 /// <param name="agent">代理信息</param>
 /// <param name="gameID">添加用户的游戏id</param>
 /// <returns></returns>
 public Message InsertAgentUser(int userid, AccountsAgentInfo agent, int gameID)
 {
     return(accountsData.InsertAgentUser(userid, agent, gameID));
 }