private void btnLogin_Click(object sender, EventArgs e)
        {
            if (ValidaUsuario(txtEmail.Text, txtPassword.Text))
            {
                this.DialogResult = DialogResult.OK;

                this.Hide();

                Modal.FormPrincipal formhome = new Modal.FormPrincipal();
                formhome.ShowDialog();
            }
            else
            {
                this.DialogResult = DialogResult.Cancel;
            }
        }
Exemple #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (ValidaUsuario(txtEmail.Text, txtPassword.Text))
            {
                this.DialogResult = DialogResult.OK;

                this.Hide();

                Modal.FormPrincipal formhome = new Modal.FormPrincipal();
                formhome.ShowDialog();
            }
            else
            {
                this.DialogResult = DialogResult.Cancel;

                errorLogin.SetError(txtEmail, "Email");
                errorLogin.SetError(txtPassword, "Senha");

                errorLogin.SetError(btnLogin, "Email ou Senha Incorretos!");
            }
        }