private void btnLogin_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtusercode.Text) || string.IsNullOrEmpty(txtpwd.Text)) { MessageBox.Show("请输入用户名或密码!", "出错"); return; } UserOR obj = new UserDA().Login(txtusercode.Text, txtpwd.Text); if (obj == null) { MessageBox.Show("用户名或密码错误。", "出错"); return; } Globals.isLogin = true; Globals.CurrentUser = obj; this.Close(); }
private void loadData() { UserOR m_obj = new UserDA().selectARowDate(m_ID); txtUserName.Text=m_obj.UserName; txtAccount.Text=m_obj.UserCode; txtUserPwd.Text=m_obj.PWD; }