/*******************登录功能******************************************/ private void loginBtn_Click(object sender, EventArgs e) { string account = userName.Text; string psw = passWord.Text; if (account != "" && psw != "") { string res = ValidateUser.validateUser(account, psw); if (res == "密码正确") { main m = new main(); m.Show(); this.Hide(); } else { MessageBox.Show(res); } } else { MessageBox.Show("请输入用户名/密码"); } }
public Form1() { Users = ValidateUser.GetDataFromDatabase(); InitializeComponent(); }