private void BindData( )
        {
            if (IntParam <= 0)
            {
                return;
            }

            //获取信息
            RecordPasswdExpend pwExpend = FacadeManage.aideRecordFacade.GetRecordPasswdExpendByRid(IntParam);

            if (pwExpend == null)
            {
                MessageBox("密码修改记录不存在");
                btnSave.Enabled = false;
                return;
            }
            AccountsInfo account = FacadeManage.aideAccountsFacade.GetAccountInfoByUserID(pwExpend.UserID);

            if (account == null)
            {
                MessageBox("用户不存在");
                btnSave.Enabled = false;
                return;
            }
            StrTitle = "玩家-" + account.Accounts + "-确认密码信息";
            CtrlHelper.SetText(ltUserID, account.UserID.ToString( ));
            CtrlHelper.SetText(ltAccounts, account.Accounts.Trim( ));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取密码修改记录
        /// </summary>
        /// <param name="rid">记录ID</param>
        /// <returns></returns>
        public RecordPasswdExpend GetRecordPasswdExpendByRid(int rid)
        {
            string             sqlQuery = string.Format("(NOLOCK) WHERE RecordID= N'{0}'", rid);
            RecordPasswdExpend model    = aideRecordPasswdExpendProvider.GetObject <RecordPasswdExpend>(sqlQuery);

            return(model);
        }
Exemplo n.º 3
0
 public void InsertRecordPasswdExpend(RecordPasswdExpend pwExpend)
 {
     System.Data.DataRow dataRow = this.aideRecordPasswdExpendProvider.NewRow();
     dataRow["ReLogonPasswd"]  = pwExpend.ReLogonPasswd;
     dataRow["ReInsurePasswd"] = pwExpend.ReInsurePasswd;
     dataRow["UserID"]         = pwExpend.UserID;
     dataRow["ClientIP"]       = pwExpend.ClientIP;
     dataRow["OperMasterID"]   = pwExpend.OperMasterID;
     dataRow["CollectDate"]    = System.DateTime.Now;
     this.aideRecordPasswdExpendProvider.Insert(dataRow);
 }
Exemplo n.º 4
0
        /// <summary>
        /// 新增一条记录
        /// </summary>
        /// <param name="pwExpend"></param>
        public void InsertRecordPasswdExpend(RecordPasswdExpend pwExpend)
        {
            DataRow dr = aideRecordPasswdExpendProvider.NewRow();

            dr[RecordPasswdExpend._ReLogonPasswd]  = pwExpend.ReLogonPasswd;
            dr[RecordPasswdExpend._ReInsurePasswd] = pwExpend.ReInsurePasswd;
            dr[RecordPasswdExpend._UserID]         = pwExpend.UserID;
            dr[RecordPasswdExpend._ClientIP]       = pwExpend.ClientIP;
            dr[RecordPasswdExpend._OperMasterID]   = pwExpend.OperMasterID;
            dr[RecordPasswdExpend._CollectDate]    = DateTime.Now;
            aideRecordPasswdExpendProvider.Insert(dr);
        }
Exemplo n.º 5
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            #region 验证
            //判断权限
            AuthUserOperationPermission(Permission.Edit);
            string strAccount  = TextFilter.FilterAll(CtrlHelper.GetText(txtAccount));      //用户名
            string strNickName = TextFilter.FilterAll(CtrlHelper.GetText(txtNickName));     //昵称

            if (string.IsNullOrEmpty(strAccount))
            {
                MessageBox("用户名不能为空!");
                return;
            }
            if (string.IsNullOrEmpty(strNickName))
            {
                strNickName = strAccount;
            }


            //计算用户权限
            int intUserRight = 0;
            if (ckbUserRight.Items.Count > 0)
            {
                foreach (ListItem item in ckbUserRight.Items)
                {
                    if (item.Selected)
                    {
                        intUserRight |= int.Parse(item.Value);
                    }
                }
            }
            //计算管理权限
            int intMasterRight = 0;
            if (ckbMasterRight.Items.Count > 0)
            {
                foreach (ListItem item in ckbMasterRight.Items)
                {
                    if (item.Selected)
                    {
                        intMasterRight |= int.Parse(item.Value);
                    }
                }
            }
            #endregion

            AccountsInfo model = new AccountsInfo( );
            model = aideAccountsFacade.GetAccountInfoByUserID(IntParam);
            if (model == null)
            {
                return;
            }
            string strOldAccounts   = model.Accounts;   //原用户名
            string strOldNickName   = model.NickName;   //原昵称
            string strOldLogonPass  = model.LogonPass;  //原登录密码
            string strOldInsurePass = model.InsurePass; //原银行密码

            model.UserID      = IntParam;
            model.Accounts    = strAccount;
            model.NickName    = strNickName;
            model.LogonPass   = string.IsNullOrEmpty(CtrlHelper.GetText(txtLogonPass)) ? model.LogonPass : Utility.MD5(CtrlHelper.GetText(txtLogonPass));
            model.InsurePass  = string.IsNullOrEmpty(CtrlHelper.GetText(txtInsurePass)) ? model.InsurePass : Utility.MD5(CtrlHelper.GetText(txtInsurePass));
            model.UnderWrite  = CtrlHelper.GetText(txtUnderWrite);
            model.Experience  = CtrlHelper.GetInt(txtExperience, 0);
            model.Present     = CtrlHelper.GetInt(txtPresent, 0);
            model.LoveLiness  = CtrlHelper.GetInt(txtLoveLiness, 0);
            model.Gender      = byte.Parse(ddlGender.SelectedValue);
            model.FaceID      = ( short )GameRequest.GetFormInt("inFaceID", 0);
            model.Nullity     = ( byte )(ckbNullity.Checked ? 1 : 0);
            model.StunDown    = ( byte )(ckbStunDown.Checked ? 1 : 0);
            model.MoorMachine = byte.Parse(rdoMoorMachine.SelectedValue);

            model.IsAndroid   = ( byte )(chkIsAndroid.Checked ? 1 : 0);
            model.UserRight   = intUserRight;
            model.MasterRight = intMasterRight;
            model.MasterOrder = Convert.ToByte(ddlMasterOrder.SelectedValue.Trim( ));

            Message msg = new Message( );
            msg = aideAccountsFacade.UpdateAccount(model);

            if (msg.Success)
            {
                MessageBox("信息修改成功");
                //判断是否有修改昵称,若修改则写入日志表
                if (!strOldNickName.Equals(model.NickName))
                {
                    RecordAccountsExpend actExend = new RecordAccountsExpend( );
                    actExend.OperMasterID = userExt.UserID;
                    actExend.ReAccounts   = model.NickName;
                    actExend.UserID       = model.UserID;
                    actExend.ClientIP     = GameRequest.GetUserIP( );
                    aideRecordFacade.InsertRecordAccountsExpend(actExend);
                }
                //判断是否有修改登录密码或银行密码,若修改则写入日志表
                if (!strOldLogonPass.Equals(model.LogonPass) || !strOldInsurePass.Equals(model.InsurePass))
                {
                    RecordPasswdExpend pwExend = new RecordPasswdExpend( );
                    pwExend.OperMasterID   = userExt.UserID;
                    pwExend.UserID         = model.UserID;
                    pwExend.ReLogonPasswd  = string.IsNullOrEmpty(CtrlHelper.GetText(txtLogonPass)) ? "" : model.LogonPass;
                    pwExend.ReInsurePasswd = string.IsNullOrEmpty(CtrlHelper.GetText(txtInsurePass)) ? "" : model.InsurePass;
                    pwExend.ClientIP       = GameRequest.GetUserIP( );
                    aideRecordFacade.InsertRecordPasswdExpend(pwExend);
                }
                MessageBox("操作成功!");
                Redirect(Request.Url.AbsoluteUri);
            }
            else
            {
                MessageBox(msg.Content);
            }
        }
Exemplo n.º 6
0
 /// <summary>
 /// 新增一条记录
 /// </summary>
 /// <param name="pwExpend"></param>
 public void InsertRecordPasswdExpend(RecordPasswdExpend pwExpend)
 {
     aideRecordData.InsertRecordPasswdExpend(pwExpend);
 }