コード例 #1
0
        private void button4_Click_1(object sender, EventArgs e)
        {
            Form home = new HomeView();

            home.Show();
            this.Hide();
        }
コード例 #2
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (txtUser.Text == string.Empty || txtPassword.Text == string.Empty)
     {
         MessageBox.Show("Preencha todos os campos!");
     }
     else
     {
         if (loginDAO.ValidaLogin(txtUser.Text, txtPassword.Text))
         {
             Form home = new HomeView();
             home.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Usuário ou senha inválida");
         }
     }
 }