private void button1_Click(object sender, EventArgs e) { bool isValidUser = false; string message = "用户名或密码错误,请重新输入"; if (ValidateInput()) { isValidUser = ValidateUser(cboLogInType.Text, txtLogInId.Text, txtLogInPwd.Text); if (isValidUser) { UserHelper.loginId = txtLogInId.Text; UserHelper.loginType = cboLogInType.Text; this.Visible = false; } else { MessageBox.Show(message, "登入失败,请与管理员联系!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
2021-12-28 14:39:38 483KB 欢迎探讨
1