Example #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            _EmpInfoMenthod tbEmp = new _EmpInfoMenthod();

            if (txtID.Text == "")
            {
                MessageBox.Show("用户名不能为空!");
                return;
            }
            if (txtPwd.Text == "")
            {
                MessageBox.Show("密码不能为空!");
                return;
            }
            if (tbEmp.tb_EmpInfoFind(txtID.Text, txtPwd.Text, 2) == 1)
            {
                frmMain frm = new frmMain(txtID.Text);
                frm.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("登录失败!");
            }
        }