private void login() { if (Usrid.Text.Trim() != "" & Pwd.Text.Trim() != "") { try { t_ADMM_UsrMst admin = n.LoginHandle(Usrid.Text.Trim(), Pwd.Text.Trim()); if (admin != null) { this.Hide(); new Form2(admin).ShowDialog(); } else { DevExpress.XtraEditors.XtraMessageBox.Show("用户名或密码错误"); } } catch (Exception ex) { MessageBox.Show(ex.Message); }; } else { DevExpress.XtraEditors.XtraMessageBox.Show("用户名或密码不能为空"); } }