/// <summary>
        /// 加载数据
        /// </summary>
        private void BindData()
        {
            AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(IntParam);

            if (agent.AgentID != 0)
            {
                CtrlHelper.SetText(lblAgentID, agent.AgentID.ToString());
                CtrlHelper.SetText(lblGameID, GetGameID(IntParam));
                CtrlHelper.SetText(lblAccounts, GetAccounts(IntParam));
            }

            CtrlHelper.SetText(lblChildCount, FacadeManage.aideAccountsFacade.GetAgentChildCount(IntParam).ToString());

            //获取代理分成详情
            DataSet ds           = FacadeManage.aideTreasureFacade.GetAgentFinance(IntParam);
            Int64   agentRevenue = Convert.ToInt64(ds.Tables[0].Rows[0]["AgentRevenue"]);
            Int64   agentPay     = Convert.ToInt64(ds.Tables[0].Rows[0]["AgentPay"]);
            Int64   agentPayBack = Convert.ToInt64(ds.Tables[0].Rows[0]["AgentPayBack"]);
            Int64   agentIn      = agentRevenue + agentPay + agentPayBack;
            Int64   agentOut     = Convert.ToInt64(ds.Tables[0].Rows[0]["AgentOut"]);
            Int64   agentRemain  = agentIn - agentOut;

            CtrlHelper.SetText(lblRevenue, agentRevenue.ToString());
            CtrlHelper.SetText(lblPay, agentPay.ToString());
            CtrlHelper.SetText(lblPayBack, agentPayBack.ToString());
            CtrlHelper.SetText(lblIn, agentIn.ToString());
            CtrlHelper.SetText(lblOut, agentOut.ToString());
            CtrlHelper.SetText(lblRemain, agentRemain.ToString());
        }
示例#2
0
        /// <summary>
        /// 获取用户推广域名
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        public static string GetSpreaderUrl(int userID)
        {
            string        sDomain = "";
            AccountsAgent model   = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(userID);

            sDomain = model.Domain;
            if (sDomain == "")
            {
                //获取推广域名
                int gameID = FacadeManage.aideAccountsFacade.GetGameIDByUserID(userID);
                // 域名以.分组第二个元素值
                string[] domainSplit = HttpContext.Current.Request.Url.Authority.ToString().Split('.');
                if (domainSplit.Length < 2)
                {
                    return("");
                }

                string element = domainSplit[1];
                // 域名所有后缀
                Array list = AppConfig.domainSuffixList.Split('|');
                if (Array.IndexOf(list, element) != -1)
                {
                    // 顶级域名但不带www
                    sDomain = gameID + "." + HttpContext.Current.Request.Url.Authority;
                }
                else
                {
                    sDomain = gameID + "." + HttpContext.Current.Request.Url.Authority.Substring(HttpContext.Current.Request.Url.Authority.IndexOf('.') + 1);
                }
            }
            return(sDomain);
        }
        /// <summary>
        /// 绑定查询数据
        /// </summary>
        private void DataBindInsure()
        {
            StringBuilder sWhere = new StringBuilder();

            sWhere.Append(" WHERE ");

            if (Convert.ToInt32(ddlType.SelectedValue) != 0)
            {
                if (Convert.ToInt32(ddlType.SelectedValue) < 3)
                {
                    sWhere.AppendFormat(" TradeType = {0} AND SourceUserID = {1}", Convert.ToInt32(ddlType.SelectedValue) == 1 ? 1 : 2, Fetch.GetUserCookie().UserID);
                }
                else
                {
                    if (Convert.ToInt32(ddlType.SelectedValue) == 3)
                    {
                        sWhere.AppendFormat(" SourceUserID = {0} AND TradeType = 3 and TargetUserID <> {0}", Fetch.GetUserCookie().UserID);
                    }
                    else if (Convert.ToInt32(ddlType.SelectedValue) == 4)
                    {
                        sWhere.AppendFormat(" SourceUserID <> {0} AND TradeType = 3 and TargetUserID = {0}", Fetch.GetUserCookie().UserID);
                    }
                }
            }
            else
            {
                SystemStatusInfo status = FacadeManage.aideAccountsFacade.GetSystemStatusInfo(AppConfig.SystemConfigKey.TransferStauts.ToString());
                AccountsAgent    agent  = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(Fetch.GetUserCookie().UserID);
                if (status != null && status.StatusValue == 1 && (agent.AgentID == 0 || agent.Nullity == 1))
                {
                    sWhere.AppendFormat(" (SourceUserID = {0} OR TargetUserID = {0}) AND TradeType!=3", Fetch.GetUserCookie().UserID);
                }
                else
                {
                    sWhere.AppendFormat(" SourceUserID = {0} OR TargetUserID = {0}", Fetch.GetUserCookie().UserID);
                }
            }
            sWhere.AppendFormat(" AND CollectDate >= '{0}' AND CollectDate <= '{1}'", Convert.ToDateTime(CtrlHelper.GetTextAndFilter(txtStartDate) + " 00:00:00"), Convert.ToDateTime(CtrlHelper.GetTextAndFilter(txtEndDate) + " 23:59:59"));

            int sPageIndex = anpPage.CurrentPageIndex;
            int sPageSize  = anpPage.PageSize;

            PagerSet pagerSet = FacadeManage.aideTreasureFacade.GetInsureTradeRecord(sWhere.ToString(), sPageIndex, sPageSize);

            anpPage.RecordCount = pagerSet.RecordCount;

            if (pagerSet.PageSet.Tables[0].Rows.Count > 0)
            {
                rptInsureList.DataSource = pagerSet.PageSet;
                rptInsureList.DataBind();

                this.rptInsureList.Visible = true;
                this.litNoData.Visible     = false;
            }
            else
            {
                this.rptInsureList.Visible = false;
                this.litNoData.Visible     = true;
            }
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ConfigInfo ci = FacadeManage.aideNativeWebFacade.GetConfigInfo(AppConfig.SiteConfigKey.GameFullPackageConfig.ToString());
            if (ci != null)
            {
                fullDownloadURL = ci.Field1;
            }

            //检查代理域名
            string agentDomain = Request.Url.Authority;
            AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByDomain(agentDomain);
            if (agent.AgentID == 0)
            {
                Response.Redirect(fullDownloadURL);
            }
            else
            {
                string filePath = Server.MapPath(fullDownloadURL);
                FileInfo file = new FileInfo(filePath);
                if (file.Exists)
                {
                    //下载
                    string fileName = file.Name;
                    byte[] info = ReadFileReturnBytes(filePath);
                    Response.AddHeader("Content-Disposition", "attachment;filename=" + agent.AgentID + "_" + fileName.Split('.')[0] + "." + fileName.Split('.')[1]);
                    Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");
                    Response.BinaryWrite(info);
                }
                else
                {
                    Response.Redirect(fullDownloadURL);
                }
            }
        }
示例#5
0
        /// <summary>
        /// 修改代理信息
        /// </summary>
        /// <returns></returns>
        public int UpdateAgentInfo(AccountsAgent agent)
        {
            string sql = "UPDATE AccountsAgent SET MobilePhone=@MobilePhone,WeChat=@WeChat WHERE UserID=@UserID";

            DbParameter[] param =
            {
                Database.MakeInParam("MobilePhone", agent.MobilePhone),
                Database.MakeInParam("WeChat",      agent.WeChat),
                Database.MakeInParam("UserID",      agent.UserID)
            };

            return(Database.ExecuteNonQuery(CommandType.Text, sql, param));
        }
示例#6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SiteMaster.Menu = 0;
     if (!IsPostBack)
     {
         AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(userTicket.UserID);
         if (agent != null)
         {
             CtrlHelper.SetText(txtPhone, agent.MobilePhone);
             CtrlHelper.SetText(txtWeiXin, agent.WeChat);
         }
     }
 }
        /// <summary>
        /// 获取代理商基本信息通过用户ID
        /// </summary>
        /// <param name="userID">用户UserID</param>
        /// <returns></returns>
        public AccountsAgent GetAccountAgentByUserID(int userID)
        {
            string        sqlQuery = string.Format("SELECT * FROM AccountsAgent(NOLOCK) WHERE UserID= {0}", userID);
            AccountsAgent model    = Database.ExecuteObject <AccountsAgent>(sqlQuery);

            if (model != null)
            {
                return(model);
            }
            else
            {
                return(new AccountsAgent());
            }
        }
        public AccountsAgent GetAccountAgentByUserID(int userID)
        {
            string        commandText   = string.Format("SELECT * FROM AccountsAgent(NOLOCK) WHERE UserID= {0}", userID);
            AccountsAgent accountsAgent = base.Database.ExecuteObject <AccountsAgent>(commandText);
            AccountsAgent result;

            if (accountsAgent != null)
            {
                result = accountsAgent;
            }
            else
            {
                result = new AccountsAgent();
            }
            return(result);
        }
示例#9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(Fetch.GetUserCookie().UserID);

            if (agent != null && agent.Nullity == 0)
            {
                agentID = agent.AgentID;
            }

            SystemStatusInfo status = FacadeManage.aideAccountsFacade.GetSystemStatusInfo(AppConfig.SystemConfigKey.TransferStauts.ToString());

            if (status != null && status.StatusValue == 1)
            {
                IsCloseTrade = true;
            }
        }
示例#10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //判断是否为代理
                UserInfo userInfo = FacadeManage.aideAccountsFacade.GetUserBaseInfoByUserID(userTicket.UserID);
                if (userInfo.AgentID == 0)
                {
                    Response.Redirect("/Member/Index.aspx");
                }

                Message umsg = FacadeManage.aideAccountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie().UserID, 0, "");
                if (umsg.Success)
                {
                    UserInfo ui = umsg.EntityList[0] as UserInfo;
                    accounts = ui.Accounts;
                }

                //代理信息
                AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(Fetch.GetUserCookie().UserID);
                if (agent.AgentID != 0)
                {
                    agentID       = agent.AgentID.ToString();
                    compellation  = agent.Compellation;
                    domain        = agent.Domain;
                    agentType     = agent.AgentType == 1 ? "充值分成" : "税收分成";
                    agentScale    = Convert.ToInt32(agent.AgentScale * 1000).ToString() + "‰";
                    payBackScore  = agent.PayBackScore.ToString();
                    payBackScale  = Convert.ToInt32(agent.PayBackScale * 1000).ToString() + "‰";
                    mobilePhone   = agent.MobilePhone;
                    eMail         = agent.EMail;
                    dwellingPlace = agent.DwellingPlace;
                    collectDate   = agent.CollectDate.ToString("yyyy-MM-dd");
                }
                //分成信息
                childCount = FacadeManage.aideAccountsFacade.GetAgentChildCount(Fetch.GetUserCookie().UserID).ToString();
                DataSet ds = FacadeManage.aideTreasureFacade.GetAgentFinance(Fetch.GetUserCookie().UserID);
                agentRevenue = Convert.ToInt64(ds.Tables[0].Rows[0]["AgentRevenue"]).ToString();
                agentPay     = Convert.ToInt64(ds.Tables[0].Rows[0]["AgentPay"]).ToString();
                agentPayBack = Convert.ToInt64(ds.Tables[0].Rows[0]["AgentPayBack"]).ToString();
                agentIn      = (Convert.ToInt64(ds.Tables[0].Rows[0]["AgentRevenue"]) + Convert.ToInt64(ds.Tables[0].Rows[0]["AgentPay"]) + Convert.ToInt64(ds.Tables[0].Rows[0]["AgentPayBack"])).ToString();
                agentOut     = Convert.ToInt64(ds.Tables[0].Rows[0]["AgentOut"]).ToString();
                agentRemain  = (Convert.ToInt64(agentIn) - Convert.ToInt64(agentOut)).ToString();

                txtScore.Text = agentRemain.ToString();
            }
        }
        /// <summary>
        /// 获取代理商基本信息通过用户域名
        /// </summary>
        /// <param name="domain"></param>
        /// <returns></returns>
        public AccountsAgent GetAccountAgentByDomain(string domain)
        {
            string sqlQuery = string.Format("SELECT * FROM AccountsAgent(NOLOCK) WHERE Domain= @Domain", domain);

            List <DbParameter> prams = new List <DbParameter>();

            prams.Add(Database.MakeInParam("Domain", domain));
            AccountsAgent model = Database.ExecuteObject <AccountsAgent>(sqlQuery, prams);

            if (model != null)
            {
                return(model);
            }
            else
            {
                return(new AccountsAgent());
            }
        }
        public AccountsAgent GetAccountAgentByDomain(string domain)
        {
            string commandText = string.Format("SELECT * FROM AccountsAgent(NOLOCK) WHERE Domain= @Domain", domain);

            System.Collections.Generic.List <System.Data.Common.DbParameter> list = new System.Collections.Generic.List <System.Data.Common.DbParameter>();
            list.Add(base.Database.MakeInParam("Domain", domain));
            AccountsAgent accountsAgent = base.Database.ExecuteObject <AccountsAgent>(commandText, list);
            AccountsAgent result;

            if (accountsAgent != null)
            {
                result = accountsAgent;
            }
            else
            {
                result = new AccountsAgent();
            }
            return(result);
        }
示例#13
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!base.IsPostBack)
     {
         AccountsAgent accountAgentByUserID = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(Fetch.GetUserCookie().UserID);
         if (accountAgentByUserID.AgentID != 0)
         {
             this.agentID       = accountAgentByUserID.AgentID.ToString();
             this.compellation  = accountAgentByUserID.Compellation;
             this.domain        = accountAgentByUserID.Domain;
             this.agentType     = ((accountAgentByUserID.AgentType == 1) ? "充值分成" : "税收分成");
             this.agentScale    = System.Convert.ToInt32(accountAgentByUserID.AgentScale * 1000m).ToString() + "‰";
             this.payBackScore  = accountAgentByUserID.PayBackScore.ToString();
             this.payBackScale  = System.Convert.ToInt32(accountAgentByUserID.PayBackScale * 1000m).ToString() + "‰";
             this.mobilePhone   = accountAgentByUserID.MobilePhone;
             this.eMail         = accountAgentByUserID.EMail;
             this.dwellingPlace = accountAgentByUserID.DwellingPlace;
             this.collectDate   = accountAgentByUserID.CollectDate.ToString("yyyy-MM-dd");
         }
     }
 }
示例#14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //代理信息
         AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(Fetch.GetUserCookie().UserID);
         if (agent.AgentID != 0)
         {
             agentID       = agent.AgentID.ToString();
             compellation  = agent.Compellation;
             domain        = agent.Domain;
             agentType     = agent.AgentType == 1 ? "充值分成" : "税收分成";
             agentScale    = Convert.ToInt32(agent.AgentScale * 1000).ToString() + "‰";
             payBackScore  = agent.PayBackScore.ToString();
             payBackScale  = Convert.ToInt32(agent.PayBackScale * 1000).ToString() + "‰";
             mobilePhone   = agent.MobilePhone;
             eMail         = agent.EMail;
             dwellingPlace = agent.DwellingPlace;
             collectDate   = agent.CollectDate.ToString("yyyy-MM-dd");
         }
     }
 }
示例#15
0
        /// <summary>
        /// 加载数据
        /// </summary>
        private void BindData()
        {
            AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(IntParam);

            if (agent.AgentID != 0)
            {
                CtrlHelper.SetText(lblAgentID, agent.AgentID.ToString());
                CtrlHelper.SetText(txtCompellation, agent.Compellation);
                CtrlHelper.SetText(txtDomain, agent.Domain);
                rblAgentType.SelectedValue = agent.AgentType.ToString();
                CtrlHelper.SetText(txtAgentScale, Convert.ToInt32(agent.AgentScale * 1000).ToString());
                CtrlHelper.SetText(txtDayBackAllPay, agent.PayBackScore.ToString());
                CtrlHelper.SetText(txtDayBackScale, Convert.ToInt32(agent.PayBackScale * 1000).ToString());
                CtrlHelper.SetText(txtMobilePhone, agent.MobilePhone);
                CtrlHelper.SetText(txtEMail, agent.EMail);
                CtrlHelper.SetText(txtDwellingPlace, agent.DwellingPlace);
                CtrlHelper.SetText(txtAgentNote, agent.AgentNote);

                CtrlHelper.SetText(lblGameID, GetGameID(IntParam));
                CtrlHelper.SetText(lblAccounts, GetAccounts(IntParam));
            }
        }
示例#16
0
        /// <summary>
        /// 绑定查询数据
        /// </summary>
        private void DataBindInsure()
        {
            StringBuilder sWhere = new StringBuilder();

            SystemStatusInfo status = FacadeManage.aideAccountsFacade.GetSystemStatusInfo(AppConfig.SystemConfigKey.TransferStauts.ToString());
            AccountsAgent    agent  = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(LUserID);

            if (status != null && status.StatusValue == 1 && (agent.AgentID == 0 || agent.Nullity == 1))
            {
                sWhere.AppendFormat(" WHERE (SourceUserID = {0} OR TargetUserID = {0}) AND TradeType!=3", LUserID);
            }
            else
            {
                sWhere.AppendFormat(" WHERE SourceUserID = {0} OR TargetUserID = {0}", LUserID);
            }

            int sPageIndex = GameRequest.GetQueryInt("page", 1);
            int sPageSize  = anpPage.PageSize;

            PagerSet pagerSet = FacadeManage.aideTreasureFacade.GetInsureTradeRecord(sWhere.ToString(), sPageIndex, sPageSize);

            anpPage.RecordCount = pagerSet.RecordCount;

            if (pagerSet.PageSet.Tables[0].Rows.Count > 0)
            {
                rptInsureList.DataSource = pagerSet.PageSet;
                rptInsureList.DataBind();

                this.rptInsureList.Visible = true;
                this.litNoData.Visible     = false;
            }
            else
            {
                this.rptInsureList.Visible = false;
                this.litNoData.Visible     = true;
            }
        }
示例#17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SiteMaster.Menu = 0;
            if (!IsPostBack)
            {
                //获取登录信息
                UserTicketInfo user = userTicket;
                lbAccount.Text = user.Accounts;
                //获取代理信息
                AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(user.UserID);
                if (agent != null)
                {
                    lbDomain.Text   = agent.Domain;
                    lbMobile.Text   = agent.MobilePhone;
                    lbNumber.Text   = agent.AgentID.ToString();
                    lbRealName.Text = agent.Compellation;
                    lbWechat.Text   = agent.WeChat;
                }
                //获取游戏币信息
                GameScoreInfo score = FacadeManage.aideTreasureFacade.GetTreasureInfo2(user.UserID);
                if (score != null)
                {
                    lbGold.Text = score.Score.ToString();
                }
                //获取房卡信息
                UserRoomCard card = FacadeManage.aideTreasureFacade.GetUserRoomCard(user.UserID);
                if (card != null)
                {
                    lbRoomCard.Text = card.RoomCard.ToString();
                }

                //获取公告信息
                rpData.DataSource = FacadeManage.aideNativeWebFacade.GetRoomCardNews(4);
                rpData.DataBind();
            }
        }
示例#18
0
        /// <summary>
        /// 保存修改
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            //获取修改数据
            string phone  = CtrlHelper.GetText(txtPhone);
            string weixin = CtrlHelper.GetText(txtWeiXin);

            //数据验证
            if (string.IsNullOrEmpty(phone))
            {
                ShowInfo("抱歉,手机号码不能为空");
                return;
            }
            if (string.IsNullOrEmpty(weixin))
            {
                ShowInfo("抱歉,微信号不能为空");
                return;
            }

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

            agent.UserID      = userTicket.UserID;
            agent.MobilePhone = phone;
            agent.WeChat      = weixin;

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

            if (result > 0)
            {
                Response.Redirect("/Index.aspx");
            }
            else
            {
                ShowInfo("抱歉,修改失败,请稍后重试");
            }
        }
示例#19
0
        private void ProcessData()
        {
            int    gameID        = CtrlHelper.GetInt(txtGameID, 0);
            string accounts      = "";
            int    userID        = 0;
            string compellation  = CtrlHelper.GetText(txtCompellation);
            string domain        = CtrlHelper.GetText(txtDomain);
            int    agentType     = Convert.ToInt32(rblAgentType.SelectedValue.Trim());
            int    agentScale    = CtrlHelper.GetInt(txtAgentScale, 0);
            int    dayBackAllPay = CtrlHelper.GetInt(txtDayBackAllPay, 0);
            int    dayBackScale  = CtrlHelper.GetInt(txtDayBackScale, 0);
            string mobilePhone   = CtrlHelper.GetText(txtMobilePhone);
            string eMail         = CtrlHelper.GetText(txtEMail);
            string dwellingPlace = CtrlHelper.GetText(txtDwellingPlace);
            string agentNote     = CtrlHelper.GetText(txtAgentNote);

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

            if (info.UserID == 0)
            {
                MessageBox("无效的用户信息");
                return;
            }
            else
            {
                userID   = info.UserID;
                accounts = info.Accounts;
            }
            if (compellation == "")
            {
                MessageBox("真实姓名不能为空");
                return;
            }
            if (domain == "")
            {
                MessageBox("代理域名不能为空");
                return;
            }
            if (agentScale < 0 || agentScale > 1000)
            {
                MessageBox("分成比例输入非法");
                return;
            }
            if (dayBackAllPay < 0)
            {
                MessageBox("日累计充值返现输入非法");
                return;
            }
            if (dayBackScale < 0 || dayBackScale > 1000)
            {
                MessageBox("返现比例输入非法");
                return;
            }
            if (mobilePhone == "")
            {
                MessageBox("联系电话不能为空");
                return;
            }

            AccountsAgent agent = new AccountsAgent();

            agent.UserID        = userID;
            agent.Compellation  = compellation;
            agent.Domain        = domain;
            agent.AgentType     = agentType;
            agent.AgentScale    = Convert.ToDecimal(agentScale) / 1000;
            agent.PayBackScore  = dayBackAllPay;
            agent.PayBackScale  = Convert.ToDecimal(dayBackScale) / 1000;
            agent.MobilePhone   = mobilePhone;
            agent.EMail         = eMail;
            agent.DwellingPlace = dwellingPlace;
            agent.AgentNote     = agentNote;

            Message msg = FacadeManage.aideAccountsFacade.AddAgent(agent);

            if (msg.Success)
            {
                MessageBoxCloseRef(msg.Content);
            }
            else
            {
                MessageBox(msg.Content);
            }
        }
示例#20
0
 public bool UpdateAgent(AccountsAgent agent)
 {
     return(aideAccountsData.UpdateAgent(agent));
 }
示例#21
0
 public Message AddAgent(AccountsAgent agent)
 {
     return(aideAccountsData.AddAgent(agent));
 }
示例#22
0
        /// <summary>
        /// 登录
        /// </summary>
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            //获取登录数据
            string accounts = CtrlHelper.GetTextAndFilter(txtAccounts);
            string password = CtrlHelper.GetTextAndFilter(txtPassword);
            string code     = CtrlHelper.GetText(txtCode);

            //数据验证
            if (string.IsNullOrEmpty(accounts))
            {
                ShowInfo("抱歉,登录账号不能为空!");
                return;
            }
            if (string.IsNullOrEmpty(password))
            {
                ShowInfo("抱歉,登录密码不能为空!");
                return;
            }
            if (string.IsNullOrEmpty(code))
            {
                ShowInfo("抱歉,验证码不能为空!");
                return;
            }
            if (!code.Equals(Fetch.GetVerifyCode(), StringComparison.InvariantCultureIgnoreCase))
            {
                ShowInfo("抱歉,验证码不正确!");
                return;
            }

            //执行登录
            Message umsg = FacadeManage.aideAccountsFacade.Logon(accounts, password);

            if (umsg.Success)
            {
                UserInfo ui = umsg.EntityList[0] as UserInfo;
                if (ui.AgentID > 0)
                {
                    AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(ui.UserID);
                    if (agent == null || agent.Nullity == 1)
                    {
                        ShowInfo("抱歉,您的代理账号已被冻结!");
                        return;
                    }

                    Fetch.SetUserCookie(ui.ToUserTicketInfo());
                    if (GameRequest.GetQueryString("url") != "")
                    {
                        Response.Redirect(GameRequest.GetQueryString("url"));
                    }
                    else
                    {
                        Response.Redirect("/Index.aspx");
                    }
                }
                else
                {
                    ShowInfo("抱歉,您的账号不是代理账号!");
                    return;
                }
            }
            else
            {
                ShowInfo(umsg.Content);
                return;
            }
        }
示例#23
0
 /// <summary>
 /// 修改代理信息
 /// </summary>
 /// <returns></returns>
 public int UpdateAgentInfo(AccountsAgent agent)
 {
     return(accountsData.UpdateAgentInfo(agent));
 }
示例#24
0
        private void BindData()
        {
            if (IntParam <= 0)
            {
                return;
            }

            //获取信息
            AccountsInfo model = FacadeManage.aideAccountsFacade.GetAccountInfoByUserID(IntParam);

            if (model == null)
            {
                MessageBox("用户信息不存在");
                return;
            }
            //CtrlHelper.SetText( ltUserID, model.UserID.ToString( ) );
            CtrlHelper.SetText(ltGameID, model.GameID.ToString());
            CtrlHelper.SetText(ltRegAccounts, model.RegAccounts.Trim());
            CtrlHelper.SetText(txtAccount, model.Accounts.Trim());
            CtrlHelper.SetText(txtNickName, model.NickName.Trim());
            CtrlHelper.SetText(litCompellation, model.Compellation);
            //CtrlHelper.SetText(litUserMedal, model.UserMedal.ToString());

            CtrlHelper.SetText(txtUnderWrite, model.UnderWrite.Trim());
            CtrlHelper.SetCheckBoxValue(ckbNullity, model.Nullity);
            CtrlHelper.SetCheckBoxValue(ckbStunDown, model.StunDown);
            CtrlHelper.SetText(txtExperience, model.Experience.ToString().Trim());
            CtrlHelper.SetText(txtPresent, model.Present.ToString().Trim());
            CtrlHelper.SetText(txtLoveLiness, model.LoveLiness.ToString().Trim());
            CtrlHelper.SetText(ltProtectID, model.ProtectID > 0 ? "<span style=\"font-weight: bold;\">已申请</span>&nbsp;<a href=\"javascript:openWindow('AccountsProtectInfo.aspx?param=" + model.ProtectID + "',580,320)\" class=\"l1\">点击查看</a>" : "未申请");
            CtrlHelper.SetText(ltMemberInfo, GetMemberName(model.MemberOrder) + (model.MemberOrder == 0 ? "" : "&nbsp;&nbsp;&nbsp;&nbsp;到期时间:" + model.MemberSwitchDate.ToString("yyyy-MM-dd mm:HH:ss")));
            if (model.SpreaderID != 0)
            {
                AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(model.SpreaderID);
                if (agent.UserID != 0)
                {
                    litSName.Text = "代理商";
                }
                else
                {
                    litSName.Text = "推广人";
                }
                CtrlHelper.SetText(ltSpreader, GetAccounts(model.SpreaderID));
            }
            if (model.MemberOrder != 0)
            {
                plMemberList.Visible = true;
            }

            faceUrl = FacadeManage.aideAccountsFacade.GetUserFaceUrl(model.FaceID, model.CustomID);
            if (model.CustomID != 0 && FacadeManage.aideAccountsFacade.GetAccountsFace(model.CustomID) != null)
            {
                faceId   = model.CustomID;
                faceType = 2;
            }
            else
            {
                faceId   = model.FaceID;
                faceType = 1;
            }

            ddlGender.SelectedValue      = model.Gender.ToString();
            rdoMoorMachine.SelectedValue = model.MoorMachine.ToString();
            //用户权限
            int intUserRight = model.UserRight;

            if (ckbUserRight.Items.Count > 0)
            {
                foreach (ListItem item in ckbUserRight.Items)
                {
                    item.Selected = int.Parse(item.Value) == (intUserRight & int.Parse(item.Value));
                }
            }
            //玩家身份
            ddlMasterOrder.SelectedValue = model.MasterOrder.ToString().Trim();
            //用户管理权限
            int intMasterRight = model.MasterRight;

            if (ckbMasterRight.Items.Count > 0)
            {
                foreach (ListItem item in ckbMasterRight.Items)
                {
                    item.Selected = int.Parse(item.Value) == (intMasterRight & int.Parse(item.Value));
                }
            }
            //机器人
            CtrlHelper.SetCheckBoxValue(chkIsAndroid, model.IsAndroid);

            //登录、注册信息
            CtrlHelper.SetText(ltWebLogonTimes, model.WebLogonTimes.ToString());
            CtrlHelper.SetText(ltGameLogonTimes, model.GameLogonTimes.ToString());
            CtrlHelper.SetText(ltLastLogonDate, model.LastLogonDate.ToString("yyyy-MM-dd HH:mm:ss"));
            CtrlHelper.SetText(ltLogonSpacingTime, Fetch.GetTimeSpan(Convert.ToDateTime(model.LastLogonDate), DateTime.Now));
            CtrlHelper.SetText(ltLastLogonIP, model.LastLogonIP.ToString());
            CtrlHelper.SetText(ltLogonIPInfo, IPQuery.GetAddressWithIP(model.LastLogonIP.ToString()));
            CtrlHelper.SetText(ltLastLogonMachine, model.LastLogonMachine.ToString());
            CtrlHelper.SetText(ltRegisterDate, model.RegisterDate.ToString("yyyy-MM-dd HH:mm:ss"));
            CtrlHelper.SetText(ltRegisterIP, model.RegisterIP.ToString());
            CtrlHelper.SetText(ltRegIPInfo, IPQuery.GetAddressWithIP(model.RegisterIP.ToString()));
            CtrlHelper.SetText(ltRegisterMachine, model.RegisterMachine.ToString());
            CtrlHelper.SetText(ltRegisterOrigin, GetRegisterOrigin(model.RegisterOrigin));
            CtrlHelper.SetText(ltOnLineTimeCount, Fetch.ConverTimeToDHMS(model.OnLineTimeCount));
            CtrlHelper.SetText(ltPlayTimeCount, Fetch.ConverTimeToDHMS(model.PlayTimeCount));

            //密保卡信息
            //PasswordCard pc = new PasswordCard( );
            if (model.PasswordID != 0)
            {
                LiteralPasswordCard.Text = "<span style=\"font-weight: bold;\">已绑定</span>";
                spanPasswordCard.Visible = true;
            }
        }
示例#25
0
        private void ProcessData()
        {
            string compellation  = CtrlHelper.GetText(txtCompellation);
            string domain        = CtrlHelper.GetText(txtDomain);
            int    agentType     = Convert.ToInt32(rblAgentType.SelectedValue.Trim());
            int    agentScale    = CtrlHelper.GetInt(txtAgentScale, 0);
            int    dayBackAllPay = CtrlHelper.GetInt(txtDayBackAllPay, 0);
            int    dayBackScale  = CtrlHelper.GetInt(txtDayBackScale, 0);
            string mobilePhone   = CtrlHelper.GetText(txtMobilePhone);
            string eMail         = CtrlHelper.GetText(txtEMail);
            string dwellingPlace = CtrlHelper.GetText(txtDwellingPlace);
            string agentNote     = CtrlHelper.GetText(txtAgentNote);

            //判断代理域名唯一
            AccountsAgent model = FacadeManage.aideAccountsFacade.GetAccountAgentByDomain(domain);

            if (model != null && model.UserID != IntParam)
            {
                MessageBox("代理域名已经存在");
                return;
            }

            if (compellation == "")
            {
                MessageBox("真实姓名不能为空");
                return;
            }
            if (domain == "")
            {
                MessageBox("代理域名不能为空");
                return;
            }
            if (agentScale < 0 || agentScale > 1000)
            {
                MessageBox("分成比例输入非法");
                return;
            }
            if (dayBackAllPay < 0)
            {
                MessageBox("日累计充值返现输入非法");
                return;
            }
            if (dayBackScale < 0 || dayBackScale > 1000)
            {
                MessageBox("返现比例输入非法");
                return;
            }
            if (mobilePhone == "")
            {
                MessageBox("联系电话不能为空");
                return;
            }

            AccountsAgent agent = new AccountsAgent();

            agent.UserID        = IntParam;
            agent.Compellation  = compellation;
            agent.Domain        = domain;
            agent.AgentType     = agentType;
            agent.AgentScale    = Convert.ToDecimal(agentScale) / 1000;
            agent.PayBackScore  = dayBackAllPay;
            agent.PayBackScale  = Convert.ToDecimal(dayBackScale) / 1000;
            agent.MobilePhone   = mobilePhone;
            agent.EMail         = eMail;
            agent.DwellingPlace = dwellingPlace;
            agent.AgentNote     = agentNote;

            bool ret = FacadeManage.aideAccountsFacade.UpdateAgent(agent);

            if (ret)
            {
                MessageBoxCloseRef("代理信息更新成功");
            }
            else
            {
                MessageBox("代理信息更新失败");
            }
        }