示例#1
0
        private void ChangePassWord()
        {
            String pw1 = textBoxPw1.Text;
            String pw2 = textBoxPw2.Text;

            if (String.IsNullOrEmpty(pw1))
            {
                labelMessage.Text = "请输入密码";
            }
            else
            {
                if (String.IsNullOrEmpty(pw2))
                {
                    labelMessage.Text = "请输入确认密码";
                }
                else
                {
                    if (!pw1.Equals(pw2))
                    {
                        labelMessage.Text = "两次输入的密码不一致";
                    }
                    else
                    {
                        UserAction action = new UserAction();
                        action.ChangePassword(UserInformationContext.ID, pw1);
                        MessageHelper.ShowInformationNotify(this, "密码修改完成");
                        Close();
                    }
                }
            }
        }