protected void btnSave_Click(object sender, EventArgs e)
        {
            AccountsProtect model = new AccountsProtect( );

            model.ProtectID = IntParam;
            model.Question1 = TextFilter.FilterAll(CtrlHelper.GetSelectValue(ddlQuestion1));
            model.Question2 = TextFilter.FilterAll(CtrlHelper.GetSelectValue(ddlQuestion2));
            model.Question3 = TextFilter.FilterAll(CtrlHelper.GetSelectValue(ddlQuestion3));
            model.Response1 = TextFilter.FilterAll(CtrlHelper.GetText(txtResponse1));
            model.Response2 = TextFilter.FilterAll(CtrlHelper.GetText(txtResponse2));
            model.Response3 = TextFilter.FilterAll(CtrlHelper.GetText(txtResponse3));
            model.SafeEmail = TextFilter.FilterAll(CtrlHelper.GetText(txtSafeEmail));


            Message msg = new Message( );

            msg = FacadeManage.aideAccountsFacade.UpdateAccountsProtect(model);

            if (msg.Success)
            {
                MessageBox("密保信息修改成功");
            }
            else
            {
                MessageBox(msg.Content);
            }
        }
Beispiel #2
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            AccountsProtect protect = new AccountsProtect();

            protect.UserID      = Fetch.GetUserCookie().UserID;
            protect.InsurePass  = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtNewPass));
            protect.Response1   = CtrlHelper.GetText(txtResponse1);
            protect.Response2   = CtrlHelper.GetText(txtResponse2);
            protect.Response3   = CtrlHelper.GetText(txtResponse3);
            protect.LastLogonIP = GameRequest.GetUserIP();

            Message umsg = accountsFacade.ResetInsurePasswd(protect);

            if (umsg.Success)
            {
                this.form1.Visible = false;

                this.divRight.Visible   = true;
                this.divRight.InnerHtml = "<div class=\"Uright\">重置银行密码成功!</div>";
            }
            else
            {
                Show(umsg.Content);
                this.txtResponse1.Text = "";
                this.txtResponse2.Text = "";
                this.txtResponse3.Text = "";
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Message umsg = accountsFacade.GetUserSecurityByUserID(Fetch.GetUserCookie().UserID);
                if (umsg.Success)
                {
                    AccountsProtect protect = umsg.EntityList[0] as AccountsProtect;
                    lblQuestion1.Text = protect.Question1;
                    lblQuestion2.Text = protect.Question2;
                    lblQuestion3.Text = protect.Question3;

                    this.form1.Visible    = true;
                    this.form2.Visible    = false;
                    this.divRight.Visible = false;
                }
                else
                {
                    this.form1.Visible      = false;
                    this.form2.Visible      = false;
                    this.divRight.Visible   = true;
                    this.divRight.InnerHtml = "<div class=\"Uerror\">您还没有申请密码保护功能,请先<a href='/Member/ApplyProtect.aspx'>申请密保</a></div>";
                }
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
Beispiel #4
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            AccountsProtect protect = new AccountsProtect( );

            protect.UserID       = Fetch.GetUserCookie( ).UserID;
            protect.SafeEmail    = TextFilter.FilterScript(txtSafeEmail.Text.Trim( ));
            protect.PassportID   = TextFilter.FilterScript(txtPassportID.Text.Trim( ));
            protect.PassportType = Convert.ToByte(ddlPassportType.SelectedValue);
            protect.CreateIP     = GameRequest.GetUserIP( );

            protect.Question1 = ddlQuestion1.SelectedValue;
            protect.Question2 = ddlQuestion2.SelectedValue;
            protect.Question3 = ddlQuestion3.SelectedValue;
            protect.Response1 = TextFilter.FilterScript(txtResponse1.Text.Trim( ));
            protect.Response2 = TextFilter.FilterScript(txtResponse2.Text.Trim( ));
            protect.Response3 = TextFilter.FilterScript(txtResponse3.Text.Trim( ));

            Message umsg = accountsFacade.ApplyUserSecurity(protect);

            if (umsg.Success)
            {
                this.form1.Visible    = false;
                this.divRight.Visible = true;
            }
            else
            {
                Show(umsg.Content);
            }
        }
Beispiel #5
0
        /// <summary>
        /// 更新用户密保信息
        /// </summary>
        /// <param name="accountProtect"></param>
        public void UpdateAccountsProtect(AccountsProtect accountProtect)
        {
            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.Append("UPDATE AccountsProtect SET ")
            .Append("Question1=@Question1, ")
            .Append("Response1=@Response1, ")
            .Append("Question2=@Question2, ")
            .Append("Response2=@Response2, ")
            .Append("Question3=@Question3, ")
            .Append("Response3=@Response3, ")
            .Append("SafeEmail=@SafeEmail, ")
            .Append("ModifyDate=getdate()  ")
            .Append("WHERE ProtectID=@ProtectID");

            var prams = new List <DbParameter>();

            prams.Add(Database.MakeInParam("Question1", accountProtect.Question1));
            prams.Add(Database.MakeInParam("Response1", accountProtect.Response1));
            prams.Add(Database.MakeInParam("Question2", accountProtect.Question2));
            prams.Add(Database.MakeInParam("Response2", accountProtect.Response2));
            prams.Add(Database.MakeInParam("Question3", accountProtect.Question3));
            prams.Add(Database.MakeInParam("Response3", accountProtect.Response3));
            prams.Add(Database.MakeInParam("SafeEmail", accountProtect.SafeEmail));
            prams.Add(Database.MakeInParam("ProtectID", accountProtect.ProtectID));

            Database.ExecuteNonQuery(CommandType.Text, sqlQuery.ToString(), prams.ToArray());
        }
Beispiel #6
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            AccountsProtect protect = new AccountsProtect();

            protect.UserID    = Fetch.GetUserCookie().UserID;
            protect.SafeEmail = CtrlHelper.GetText(txtSafeEmail);
            protect.ModifyIP  = GameRequest.GetUserIP();

            protect.Question1 = ddlQuestion1.SelectedValue;
            protect.Question2 = ddlQuestion2.SelectedValue;
            protect.Question3 = ddlQuestion3.SelectedValue;
            protect.Response1 = CtrlHelper.GetText(txtMResponse1);
            protect.Response2 = CtrlHelper.GetText(txtMResponse2);
            protect.Response3 = CtrlHelper.GetText(txtMResponse3);

            Message umsg = accountsFacade.ModifyUserSecurity(protect);

            if (umsg.Success)
            {
                this.form2.Visible      = false;
                this.divRight.Visible   = true;
                this.divRight.InnerHtml = "<div class=\"Uright\">您已经成功修改了密码保护!</div>";
            }
            else
            {
                Show(umsg.Content);
            }
        }
Beispiel #7
0
        /// <summary>
        /// 获取用户密保信息
        /// </summary>
        /// <param name="pid">密保ProtectID</param>
        /// <returns></returns>
        public AccountsProtect GetAccountsProtectByPID(int pid)
        {
            string          sqlQuery = string.Format("(NOLOCK) WHERE ProtectID= N'{0}'", pid);
            AccountsProtect model    = aideAccountsProtectProvider.GetObject <AccountsProtect>(sqlQuery);

            return(model);
        }
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            AccountsProtect protect = new AccountsProtect();

            protect.UserID      = Fetch.GetUserCookie().UserID;
            protect.InsurePass  = TextEncrypt.EncryptPassword(CtrlHelper.GetTextAndFilter(txtNewPass));
            protect.Response1   = CtrlHelper.GetTextAndFilter(txtResponse1);
            protect.Response2   = CtrlHelper.GetTextAndFilter(txtResponse2);
            protect.Response3   = CtrlHelper.GetTextAndFilter(txtResponse3);
            protect.LastLogonIP = GameRequest.GetUserIP();

            Message umsg = FacadeManage.aideAccountsFacade.ResetInsurePasswd(protect);

            if (umsg.Success)
            {
                RenderAlertInfo2(false, "重置银行密码成功!");
            }
            else
            {
                Show(umsg.Content);
                this.txtResponse1.Text = "";
                this.txtResponse2.Text = "";
                this.txtResponse3.Text = "";
            }
        }
Beispiel #9
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            AccountsProtect protect = new AccountsProtect();

            protect.UserID       = Fetch.GetUserCookie().UserID;
            protect.SafeEmail    = "";
            protect.PassportID   = "";
            protect.PassportType = 0;
            protect.CreateIP     = GameRequest.GetUserIP();

            protect.Question1 = ddlQuestion1.SelectedValue;
            protect.Question2 = ddlQuestion2.SelectedValue;
            protect.Question3 = ddlQuestion3.SelectedValue;
            protect.Response1 = TextFilter.FilterScript(txtResponse1.Text.Trim());
            protect.Response2 = TextFilter.FilterScript(txtResponse2.Text.Trim());
            protect.Response3 = TextFilter.FilterScript(txtResponse3.Text.Trim());

            if (protect.Question1 == "0")
            {
                Show("请选择密保问题一");
                return;
            }
            if (protect.Question2 == "0")
            {
                Show("请选择密保问题二");
                return;
            }
            if (protect.Question3 == "0")
            {
                Show("请选择密保问题三");
                return;
            }
            if (string.IsNullOrEmpty(protect.Response1))
            {
                Show("请输入密保问题一的答案");
                return;
            }
            if (string.IsNullOrEmpty(protect.Response2))
            {
                Show("请输入密保问题二的答案");
                return;
            }
            if (string.IsNullOrEmpty(protect.Response3))
            {
                Show("请输入密保问题三的答案");
                return;
            }

            Message umsg = FacadeManage.aideAccountsFacade.ApplyUserSecurity(protect);

            if (umsg.Success)
            {
                RenderAlertInfo2(false, "您已经成功申请了密码保护!");
            }
            else
            {
                Show(umsg.Content);
            }
        }
Beispiel #10
0
        /// <summary>
        /// 记忆老的密保回答
        /// </summary>
        /// <param name="protection"></param>
        public static void SetOldProtectionInfo(AccountsProtect protection)
        {
            if (protection == null)
            {
                return;
            }
            string sessionKey = string.Format("old_{0}", Fetch.GetSessionProtectionKey(protection.UserID));

            WHCache.Default.Save <SessionCache>(sessionKey, protection, 10);
        }
Beispiel #11
0
        /// <summary>
        /// 记忆老的密保回答
        /// </summary>
        /// <param name="protection"></param>
        public static void SetOldProtectionInfo(AccountsProtect protection)
        {
            if (protection == null)
            {
                return;
            }
            string sessionKey = string.Format("old_{0}", Fetch.GetSessionProtectionKey(protection.UserID));

            SessionState.Set(sessionKey, protection);
        }
 public Message ConfirmUserSecurity(AccountsProtect info)
 {
     System.Collections.Generic.List <System.Data.Common.DbParameter> list = new System.Collections.Generic.List <System.Data.Common.DbParameter>();
     list.Add(base.Database.MakeInParam("dwUserID", info.UserID));
     list.Add(base.Database.MakeInParam("strResponse1", info.Response1));
     list.Add(base.Database.MakeInParam("strResponse2", info.Response2));
     list.Add(base.Database.MakeInParam("strResponse3", info.Response3));
     list.Add(base.Database.MakeOutParam("strErrorDescribe", typeof(string), 127));
     return(MessageHelper.GetMessage(base.Database, "NET_PW_ConfirmAccountProtect", list));
 }
Beispiel #13
0
        /// <summary>
        /// 验证密保信息 (Respose 答案)
        /// </summary>
        /// <param name="userID">用户标识</param>
        /// <param name="response1">答案一</param>
        /// <param name="response2">答案二</param>
        /// <param name="response3">答案三</param>
        /// <returns></returns>
        public Message ValidUserSecurityByResponse(int userID, string response1, string response2, string response3)
        {
            AccountsProtect sInfo = new AccountsProtect();

            sInfo.UserID    = userID;
            sInfo.Response1 = response1;
            sInfo.Response2 = response2;
            sInfo.Response3 = response3;

            return(ValidUserSecurityByResponse(sInfo));
        }
 public Message RescindUserMoorMachine(AccountsProtect sInfo)
 {
     System.Collections.Generic.List <System.Data.Common.DbParameter> list = new System.Collections.Generic.List <System.Data.Common.DbParameter>();
     list.Add(base.Database.MakeInParam("dwUserID", sInfo.UserID));
     list.Add(base.Database.MakeInParam("strResponse1", sInfo.Response1));
     list.Add(base.Database.MakeInParam("strResponse2", sInfo.Response2));
     list.Add(base.Database.MakeInParam("strResponse3", sInfo.Response3));
     list.Add(base.Database.MakeInParam("strClientIP", sInfo.LastLogonIP));
     list.Add(base.Database.MakeOutParam("strErrorDescribe", typeof(string), 127));
     return(MessageHelper.GetMessage(base.Database, "NET_PW_CancelMoorMachine", list));
 }
Beispiel #15
0
        public void RetrievePassword(HttpContext context)
        {
            Message       msg      = new Message();
            AjaxJsonValid ajaxJson = new AjaxJsonValid();

            string answer1    = GameRequest.GetFormString("Answer1");
            string answer2    = GameRequest.GetFormString("Answer2");
            string answer3    = GameRequest.GetFormString("Answer3");
            string password   = GameRequest.GetFormString("Password");
            string rePassword = GameRequest.GetFormString("RePassword");
            int    userID     = GameRequest.GetFormInt("UserID", 0);

            #region 参数验证
            if (string.IsNullOrEmpty(answer1) || string.IsNullOrEmpty(answer2) || string.IsNullOrEmpty(answer3))
            {
                ajaxJson.msg = "抱歉,密保答案不能为空";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }
            if (string.IsNullOrEmpty(password))
            {
                ajaxJson.msg = "抱歉,新密码不能为空";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }
            if (password != rePassword)
            {
                ajaxJson.msg = "抱歉,两次密码输入不一致";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }
            if (userID <= 0)
            {
                ajaxJson.msg = "抱歉,找回密码用户不存在";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }
            #endregion 参数验证

            AccountsProtect protect = new AccountsProtect();
            protect.UserID      = userID;
            protect.LogonPass   = TextEncrypt.EncryptPassword(password);
            protect.Response1   = answer1;
            protect.Response2   = answer2;
            protect.Response3   = answer3;
            protect.LastLogonIP = GameRequest.GetUserIP();

            Message umsg = FacadeManage.aideAccountsFacade.ResetLogonPasswd(protect);
            ajaxJson.SetValidDataValue(umsg.Success);
            ajaxJson.msg = umsg.Content;
            context.Response.Write(ajaxJson.SerializeToJson());
        }
Beispiel #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int    typeid  = GameRequest.GetFormInt("typeid", 0);
                string content = GameRequest.GetFormString("content");

                if (typeid <= 0 || typeid > 2)
                {
                    lbTip.Text        = "抱歉,找回密码方式选择错误!";
                    fmStep2.Visible   = false;
                    fmStep3.Visible   = true;
                    btnSubmit.Visible = false;
                    return;
                }
                if (typeid == 2 && !Utils.Validate.IsPositiveInt(content))
                {
                    lbTip.Text        = "抱歉,输入的游戏ID格式错误!";
                    fmStep2.Visible   = false;
                    fmStep3.Visible   = true;
                    btnSubmit.Visible = false;
                    return;
                }

                Message msg = typeid == 1 ? FacadeManage.aideAccountsFacade.GetUserSecurityByAccounts(content)
                    : FacadeManage.aideAccountsFacade.GetUserSecurityByGameID(Convert.ToInt32(content));

                if (msg.Success)
                {
                    AccountsProtect protect = msg.EntityList[0] as AccountsProtect;
                    if (protect != null)
                    {
                        lbQuestion1.Text = protect.Question1;
                        lbQuestion2.Text = protect.Question2;
                        lbQuestion3.Text = protect.Question3;
                        hfUser.Value     = protect.UserID.ToString();
                    }
                    else
                    {
                        fmStep2.Visible = false;
                        fmStep3.Visible = true;
                    }
                }
                else
                {
                    lbTip.Text        = msg.Content;
                    fmStep2.Visible   = false;
                    fmStep3.Visible   = true;
                    btnSubmit.Visible = false;
                }
            }
        }
Beispiel #17
0
        /// <summary>
        /// 重置登录密码
        /// </summary>
        /// <param name="userID">玩家标识</param>
        /// <param name="password">新密码(密文)</param>
        /// <param name="response1">答案一</param>
        /// <param name="response2">答案二</param>
        /// <param name="response3">答案三</param>
        /// <param name="ip">连接地址</param>
        /// <returns></returns>
        public Message ResetLogonPasswd(int userID, string password, string response1, string response2, string response3, string ip)
        {
            AccountsProtect sInfo = new AccountsProtect();

            sInfo.UserID      = userID;
            sInfo.LogonPass   = password;
            sInfo.Response1   = response1;
            sInfo.Response2   = response2;
            sInfo.Response3   = response3;
            sInfo.LastLogonIP = ip == "" || ip == null?GameRequest.GetUserIP() : ip;

            return(ResetLogonPasswd(sInfo));
        }
Beispiel #18
0
        /// <summary>
        /// 重置银行密码
        /// </summary>
        /// <param name="sInfo">密保信息</param>
        /// <returns></returns>
        public Message ResetInsurePasswd(AccountsProtect sInfo)
        {
            List <DbParameter> parms = new List <DbParameter>();

            parms.Add(base.Database.MakeInParam("dwUserID", sInfo.UserID));
            parms.Add(base.Database.MakeInParam("strInsurePass", sInfo.InsurePass));
            parms.Add(base.Database.MakeInParam("strResponse1", sInfo.Response1));
            parms.Add(base.Database.MakeInParam("strResponse2", sInfo.Response2));
            parms.Add(base.Database.MakeInParam("strResponse3", sInfo.Response3));
            parms.Add(base.Database.MakeInParam("strClientIP", sInfo.LastLogonIP));
            parms.Add(base.Database.MakeOutParam("strErrorDescribe", typeof(string), 0x7f));
            return(MessageHelper.GetMessage(base.Database, "NET_PW_ResetInsurePasswd", parms));
        }
Beispiel #19
0
        /// <summary>
        /// 验证密码保护 (Passport 证件号码)
        /// </summary>
        /// <param name="userID">玩家标识</param>
        /// <param name="response1">答案一</param>
        /// <param name="response2">答案二</param>
        /// <param name="response3">答案三</param>
        /// <param name="passportID"></param>
        /// <returns>会员消息对象</returns>
        public Message ValidUserSecurityPassport(int userID
                                                 , string response1, string response2, string response3, string passportID)
        {
            AccountsProtect sInfo = new AccountsProtect();

            sInfo.UserID     = userID;
            sInfo.Response1  = response1;
            sInfo.Response2  = response2;
            sInfo.Response3  = response3;
            sInfo.PassportID = passportID;

            return(accountsData.ValidUserSecurityPassport(sInfo));
        }
Beispiel #20
0
        /// <summary>
        /// 密保确认
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public Message ConfirmUserSecurity(AccountsProtect info)
        {
            List <DbParameter> parms = new List <DbParameter>();

            parms.Add(Database.MakeInParam("dwUserID", info.UserID));

            parms.Add(Database.MakeInParam("strResponse1", info.Response1));
            parms.Add(Database.MakeInParam("strResponse2", info.Response2));
            parms.Add(Database.MakeInParam("strResponse3", info.Response3));

            parms.Add(Database.MakeOutParam("strErrorDescribe", typeof(string), 127));

            return(MessageHelper.GetMessage(Database, "NET_PW_ConfirmAccountProtect", parms));
        }
Beispiel #21
0
        /// <summary>
        /// 获取用户密保信息
        /// </summary>
        /// <param name="uid">用户标识</param>
        /// <returns></returns>
        public AccountsProtect GetAccountsProtectByUserID(int uid)
        {
            string          sqlQuery = string.Format("(NOLOCK) WHERE UserID= N'{0}'", uid);
            AccountsProtect model    = aideAccountsProtectProvider.GetObject <AccountsProtect>(sqlQuery);

            if (model != null)
            {
                return(model);
            }
            else
            {
                return(new AccountsProtect());
            }
        }
Beispiel #22
0
        /// <summary>
        /// 验证密保信息 (Respose 答案)
        /// </summary>
        /// <param name="sInfo">密保对象</param>
        /// <returns>会员消息对象</returns>
        public Message ValidUserSecurityByResponse(AccountsProtect sInfo)
        {
            List <DbParameter> parms = new List <DbParameter>();

            parms.Add(Database.MakeInParam("dwUserID", sInfo.UserID));

            parms.Add(Database.MakeInParam("strResponse1", sInfo.Response1));
            parms.Add(Database.MakeInParam("strResponse2", sInfo.Response2));
            parms.Add(Database.MakeInParam("strResponse3", sInfo.Response3));

            parms.Add(Database.MakeOutParam("strErrorDescribe", typeof(string), 127));

            return(MessageHelper.GetMessage(Database, "WEB_ValidUserSecurityByResponse", parms));
        }
Beispiel #23
0
        /// <summary>
        /// 解除机器绑定
        /// </summary>
        /// <param name="sInfo">密保信息</param>
        /// <returns></returns>
        public Message RescindUserMoorMachine(AccountsProtect sInfo)
        {
            List <DbParameter> parms = new List <DbParameter>();

            parms.Add(Database.MakeInParam("dwUserID", sInfo.UserID));

            parms.Add(Database.MakeInParam("strResponse1", sInfo.Response1));
            parms.Add(Database.MakeInParam("strResponse2", sInfo.Response2));
            parms.Add(Database.MakeInParam("strResponse3", sInfo.Response3));

            parms.Add(Database.MakeInParam("strClientIP", sInfo.LastLogonIP));
            parms.Add(Database.MakeOutParam("strErrorDescribe", typeof(string), 127));

            return(MessageHelper.GetMessage(Database, "NET_PW_CancelMoorMachine", parms));
        }
 public Message ModifyUserSecurity(AccountsProtect newInfo)
 {
     System.Collections.Generic.List <System.Data.Common.DbParameter> list = new System.Collections.Generic.List <System.Data.Common.DbParameter>();
     list.Add(base.Database.MakeInParam("dwUserID", newInfo.UserID));
     list.Add(base.Database.MakeInParam("strQuestion1", newInfo.Question1));
     list.Add(base.Database.MakeInParam("strResponse1", newInfo.Response1));
     list.Add(base.Database.MakeInParam("strQuestion2", newInfo.Question2));
     list.Add(base.Database.MakeInParam("strResponse2", newInfo.Response2));
     list.Add(base.Database.MakeInParam("strQuestion3", newInfo.Question3));
     list.Add(base.Database.MakeInParam("strResponse3", newInfo.Response3));
     list.Add(base.Database.MakeInParam("strSafeEmail", newInfo.SafeEmail));
     list.Add(base.Database.MakeInParam("strClientIP", newInfo.ModifyIP));
     list.Add(base.Database.MakeOutParam("strErrorDescribe", typeof(string), 127));
     return(MessageHelper.GetMessage(base.Database, "NET_PW_ModifyAccountProtect", list));
 }
Beispiel #25
0
        /// <summary>
        /// 申请关闭帐号
        /// </summary>
        /// <param name="sInfo">密保信息</param>
        /// <returns></returns>
        public Message ApplyUserStundown(AccountsProtect sInfo)
        {
            List <DbParameter> parms = new List <DbParameter>();

            parms.Add(Database.MakeInParam("dwUserID", sInfo.UserID));
            parms.Add(Database.MakeInParam("strPassword", sInfo.LogonPass));

            parms.Add(Database.MakeInParam("strResponse1", sInfo.Response1));
            parms.Add(Database.MakeInParam("strResponse2", sInfo.Response2));
            parms.Add(Database.MakeInParam("strResponse3", sInfo.Response3));

            parms.Add(Database.MakeInParam("strClientIP", sInfo.LastLogonIP));
            parms.Add(Database.MakeOutParam("strErrorDescribe", typeof(string), 127));

            return(MessageHelper.GetMessage(Database, "WEB_ApplyUserStundown", parms));
        }
Beispiel #26
0
        protected virtual bool IsApplyProtection(int userID, out AccountsProtect protectInfo)
        {
            protectInfo = null;
            if (userID <= 0)
            {
                return(false);
            }
            Message userSecurityByUserID = FacadeManage.aideAccountsFacade.GetUserSecurityByUserID(userID);

            if (userSecurityByUserID == null || !userSecurityByUserID.Success)
            {
                return(false);
            }
            protectInfo = (userSecurityByUserID.EntityList[0] as AccountsProtect);
            return(protectInfo.ProtectID > 0);
        }
Beispiel #27
0
        /// <summary>
        /// 获取保护信息
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        protected virtual bool IsApplyProtection(int userID, out AccountsProtect protectInfo)
        {
            protectInfo = null;
            if (userID <= 0)
            {
                return(false);
            }

            Message msg = aideUserFacade.GetUserSecurityByUserID(userID);

            if (msg == null || !msg.Success)
            {
                return(false);
            }

            protectInfo = msg.EntityList[0] as AccountsProtect;
            return(protectInfo.ProtectID > 0);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Message msg = accountsFacade.GetUserSecurityByUserID(Fetch.GetUserCookie().UserID);
                if (msg.Success)
                {
                    AccountsProtect protect = msg.EntityList[0] as AccountsProtect;
                    this.lblQuestion1.Text = protect.Question1;
                    this.lblQuestion2.Text = protect.Question2;
                    this.lblQuestion3.Text = protect.Question3;
                }
                else
                {
                    switch (msg.MessageID)
                    {
                    case 4:
                        ShowAndRedirect("您还没有申请“密码保护”功能,请先申请!", "/Member/ApplyProtect.aspx");
                        break;

                    default:
                        Show(msg.Content);
                        break;
                    }
                }

                Message umsg = accountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie().UserID, 0, "");
                if (umsg.Success)
                {
                    UserInfo userInfo = umsg.EntityList[0] as UserInfo;
                    if (userInfo.MoorMachine == 0)
                    {
                        this.btnUpdate.Text = "申请绑定";
                    }
                    else
                    {
                        this.btnUpdate.Text = "取消绑定";
                    }
                }
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
        private void BindData( )
        {
            if (IntParam <= 0)
            {
                return;
            }

            //获取信息
            AccountsProtect accountProtect = FacadeManage.aideAccountsFacade.GetAccountsProtectByPID(IntParam);

            if (accountProtect == null)
            {
                // MessageBox( "用户密保信息不存在" );
                StrTitle        = "用户密保信息不存在";
                btnSave.Enabled = false;
                btnDel.Enabled  = false;
                return;
            }
            AccountsInfo account = FacadeManage.aideAccountsFacade.GetAccountInfoByUserID(accountProtect.UserID);

            if (account == null)
            {
                MessageBox("用户信息不存在");
                return;
            }
            StrTitle = "玩家-" + account.Accounts + "-密保信息";

            CtrlHelper.SetText(ltAccounts, account.Accounts.Trim( ));
            CtrlHelper.SetText(txtSafeEmail, accountProtect.SafeEmail.Trim( ));
            ddlQuestion1.SelectedValue = accountProtect.Question1;
            ddlQuestion2.SelectedValue = accountProtect.Question2;
            ddlQuestion3.SelectedValue = accountProtect.Question3;
            CtrlHelper.SetText(txtResponse1, accountProtect.Response1.Trim( ));
            CtrlHelper.SetText(txtResponse2, accountProtect.Response2.Trim( ));
            CtrlHelper.SetText(txtResponse3, accountProtect.Response3.Trim( ));
            CtrlHelper.SetText(ltPassportID, accountProtect.PassportID.Trim( ));
            CtrlHelper.SetText(ltPassportType, GetPassPortType(accountProtect.PassportType));
            CtrlHelper.SetText(ltCreateIP, accountProtect.CreateIP.Trim( ));
            CtrlHelper.SetText(ltModifyIP, accountProtect.ModifyIP.Trim( ));
            CtrlHelper.SetText(ltCreateDate, accountProtect.CreateDate.ToString("yyyy-MM-dd HH:mm:ss"));
            CtrlHelper.SetText(ltModifyDate, accountProtect.ModifyDate.ToString("yyyy-MM-dd HH:mm:ss"));
        }
Beispiel #30
0
        /// <summary>
        /// 修改帐号保护
        /// </summary>
        /// <param name="oldInfo">旧密保信息</param>
        /// <param name="newInfo">新密保信息</param>
        /// <returns></returns>
        public Message ModifyUserSecurity(AccountsProtect newInfo)
        {
            List <DbParameter> parms = new List <DbParameter>();

            parms.Add(Database.MakeInParam("dwUserID", newInfo.UserID));

            parms.Add(Database.MakeInParam("strQuestion1", newInfo.Question1));
            parms.Add(Database.MakeInParam("strResponse1", newInfo.Response1));
            parms.Add(Database.MakeInParam("strQuestion2", newInfo.Question2));
            parms.Add(Database.MakeInParam("strResponse2", newInfo.Response2));
            parms.Add(Database.MakeInParam("strQuestion3", newInfo.Question3));
            parms.Add(Database.MakeInParam("strResponse3", newInfo.Response3));

            parms.Add(Database.MakeInParam("strSafeEmail", newInfo.SafeEmail));

            parms.Add(Database.MakeInParam("strClientIP", newInfo.ModifyIP));
            parms.Add(Database.MakeOutParam("strErrorDescribe", typeof(string), 127));

            return(MessageHelper.GetMessage(Database, "NET_PW_ModifyAccountProtect", parms));
        }