Exemple #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            //Se for maior que 0 então achou o login
            DataTable dt = usuario.VerificarUsu(txtEmail.Text, txtSenha.Text);

            if (dt.Rows.Count == 0)
            {
                MyMessageBox.Show("        E-mail ou senha incorretos! \n                Tente novamente.", "Usuário não cadastrado", "OK");
                txtEmail.Text = "";
                txtSenha.Text = "";
            }
            else
            {
                string tipo = dt.Rows[0]["tipo"].ToString();
                if (tipo == "1")
                {
                    //Form adm
                    this.Hide();
                    frmEscolhaAdm form = new frmEscolhaAdm();
                    form.ShowDialog();
                    this.Close();
                }
                else
                {
                    //Form assistente
                    this.Hide();
                    frmVisualizarRelatorios form = new frmVisualizarRelatorios();
                    form.ShowDialog();
                    this.Close();
                }
            }
        }
Exemple #2
0
        private void btnViewRelato_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmVisualizarRelatorios form = new frmVisualizarRelatorios();

            form.ShowDialog();
            this.Close();
        }