Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            zhufrom one = new zhufrom();

            one.Show();
        }
Ejemplo n.º 2
0
        private void pictureBox3_Click(object sender, EventArgs e)
        {
            LoginUser u = new LoginUser();

            u.UserName = txtUname.Text;
            u.PassWord = txtPwd.Text;

            if (txtUname.Text == "")
            {
                lblUname.Visible = true;
                lblUname.Text    = "用户名不能为空";
                return;
            }
            else if (txtPwd.Text == "")
            {
                lblPwd.Visible = true;
                lblPwd.Text    = "密码不能为空";
                return;
            }
            else
            {
                Boolean isValid = new LoginUserBLL().Check(u);
                if (isValid)
                {
                    zhufrom zhu = new zhufrom();
                    zhu.Tag = txtUname.Text;
                    zhu.Show();
                    this.Hide();
                }
                else
                {
                    lblPwd.Visible = true;
                    lblPwd.Text    = "用户名或密码不正确,登录失败";
                }
            }
        }