Beispiel #1
0
        protected void BindCheck_Click(object sender, EventArgs e)
        {
            int result = 0;

            if (int.TryParse(this.BindCheck.CommandName, out result))
            {
                string     text               = this.txtBindName.Text;
                string     sourceData         = this.txtUserPassword.Text;
                MemberInfo bindusernameMember = MemberProcessor.GetBindusernameMember(text);
                if ((bindusernameMember != null) && (bindusernameMember.UserId != result))
                {
                    this.ShowMsg("该用户名已经被绑定", false);
                }
                else if (bindusernameMember != null)
                {
                    this.ShowMsg("该用户已经绑定系统帐号", false);
                    this.LoadMemberInfo();
                }
                else if (MemberProcessor.BindUserName(result, text, HiCryptographer.Md5Encrypt(sourceData)))
                {
                    this.ShowMsg("用户绑定成功!", true);
                    Messenger.SendWeiXinMsg_SysBindUserName(MemberProcessor.GetMember(result, false), sourceData);
                    this.LoadMemberInfo();
                }
                else
                {
                    this.ShowMsg("用户绑定失败!", false);
                }
            }
            else
            {
                this.ShowMsg("用户不存在!", false);
            }
        }
Beispiel #2
0
        protected void BindCheck_Click(object sender, System.EventArgs e)
        {
            int num = 0;

            if (!int.TryParse(this.BindCheck.CommandName, out num))
            {
                this.ShowMsg("用户不存在!", false);
                return;
            }
            string     text  = this.txtBindName.Text;
            string     text2 = this.txtUserPassword.Text;
            MemberInfo bindusernameMember = MemberProcessor.GetBindusernameMember(text);

            if (bindusernameMember != null && bindusernameMember.UserId != num)
            {
                this.ShowMsg("该用户名已经被绑定", false);
                return;
            }
            if (bindusernameMember != null)
            {
                this.ShowMsg("该用户已经绑定系统帐号", false);
                this.LoadMemberInfo();
                return;
            }
            if (MemberProcessor.BindUserName(num, text, HiCryptographer.Md5Encrypt(text2)))
            {
                this.ShowMsg("用户绑定成功!", true);
                MemberInfo member = MemberProcessor.GetMember(num, false);
                Messenger.SendWeiXinMsg_SysBindUserName(member, text2);
                this.LoadMemberInfo();
                return;
            }
            this.ShowMsg("用户绑定失败!", false);
        }