//点击登陆 private void okBtn_Click(object sender, EventArgs e) { if (name.Text == "") { return; } if (m_User == null) { id.SelectAll(); id.Focus(); BathClass.printErrorMsg("该员工号不存在!"); return; } if (BathClass.GetMD5(pwd.Text) != m_User.password) { pwd.SelectAll(); pwd.Focus(); BathClass.printErrorMsg("密码不对!"); return; } write_user(); this.Hide(); MainWindow mainWindow = new MainWindow(); mainWindow.ShowDialog(); this.Close(); }