/// <summary>
 /// 判断密码是否有效。
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tbPwd_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar != 13)
     {
         return;
     }
     if (String.IsNullOrEmpty(tbUserName.Text.Trim()))
     {
         return;
     }
     if (String.IsNullOrEmpty(tbPwd.Text.Trim()))
     {
         return;
     }
     //检查密码
     if (!CheckUsers.isPasswordRight(tbUserName.Text.Trim(), tbPwd.Text.Trim(), Application.ProductName))
     {
         MessageBox.Show("密码无效", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         tbPwd.Clear();
         return;
     }
     ;
     this._user_Info   = CheckUsers.getUserInfo(tbUserName.Text.Trim(), Application.ProductName);
     this.DialogResult = DialogResult.OK;
     this.Close();
 }
 private void tbUserName_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar != 13)
     {
         return;
     }
     if (String.IsNullOrEmpty(tbUserName.Text.Trim()))
     {
         return;
     }
     //检查用户名:
     if (!CheckUsers.ifExistsUserName(tbUserName.Text.Trim(), Application.ProductName))
     {
         MessageBox.Show("用户名无效", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         tbUserName.Clear();
         return;
     }
     ;
     tbPwd.Focus();
 }
Exemple #3
0
        public Dictionary <String, IList <dynamic> > CheckUsers([FromBody] CheckUsers user)
        {
            var response = Business.User.User.CheckUsers(user.Id, user.PhoneNumber);

            return(response);
        }