Example #1
0
 public void InsertRecordAccountsExpend(RecordAccountsExpend actExpend)
 {
     System.Data.DataRow dataRow = this.aideRecordAccountsExpendProvider.NewRow();
     dataRow["ReAccounts"]   = actExpend.ReAccounts;
     dataRow["UserID"]       = actExpend.UserID;
     dataRow["ClientIP"]     = actExpend.ClientIP;
     dataRow["OperMasterID"] = actExpend.OperMasterID;
     dataRow["CollectDate"]  = System.DateTime.Now;
     this.aideRecordAccountsExpendProvider.Insert(dataRow);
 }
        /// <summary>
        /// 新增一条记录
        /// </summary>
        /// <param name="actExpend"></param>
        public void InsertRecordAccountsExpend(RecordAccountsExpend actExpend)
        {
            DataRow dr = aideRecordAccountsExpendProvider.NewRow();

            dr[RecordAccountsExpend._ReAccounts]   = actExpend.ReAccounts;
            dr[RecordAccountsExpend._UserID]       = actExpend.UserID;
            dr[RecordAccountsExpend._ClientIP]     = actExpend.ClientIP;
            dr[RecordAccountsExpend._OperMasterID] = actExpend.OperMasterID;
            dr[RecordAccountsExpend._CollectDate]  = DateTime.Now;
            aideRecordAccountsExpendProvider.Insert(dr);
        }
Example #3
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);
            }
        }
Example #4
0
 /// <summary>
 /// 新增一条记录
 /// </summary>
 /// <param name="actExpend"></param>
 public void InsertRecordAccountsExpend(RecordAccountsExpend actExpend)
 {
     aideRecordData.InsertRecordAccountsExpend(actExpend);
 }