Esempio n. 1
0
 void Save()
 {
     if (string.IsNullOrEmpty(tbName.Text))
     {
         MessageBox.Show("用户名不能为空");
         return;
     }
     if (string.IsNullOrEmpty(this.tbPw.Password))
     {
         MessageBox.Show("旧密码不能为空");
         return;
     }
     if (string.IsNullOrEmpty(this.tbNewPw.Password))
     {
         MessageBox.Show("新密码不能为空");
         return;
     }
     if (!this.tbNewPw.Password.Equals(this.tbNewPwSumbit.Password))
     {
         MessageBox.Show("新密码两次输入不一致");
         return;
     }
     if (CommonMethod.GetLength(tbNewPw.Password) > 16)
     {
         MessageBox.Show("新密码长度过长");
         return;
     }
     client.ChangeUserPwAsync(tbName.Text, tbPw.Password, tbNewPw.Password);
     BeginWindowLoading(this);
 }