Example #1
0
        private void btnEnrar_Click(object sender, EventArgs e)
        {
            try
            {
                FuncionariosBO funcBo = new FuncionariosBO();
                Funcionarios   func   = new Funcionarios();
                func.Cpf   = Convert.ToInt64(mskCPF.Text);
                func.Senha = txtSenha.Text;

                funcBo.Login(func);
                if (funcBo.tem == true)
                {
                    MessageBox.Show("Seja Bem Vindo!");

                    this.Hide();
                    frmMenu menuzin = new frmMenu();
                    menuzin.Closed += (s, args) => this.Close();
                    menuzin.Show();
                }
                else
                {
                    MessageBox.Show("Verifique os dados e tente novamente");
                }
            }
            catch
            {
                MessageBox.Show("Verifique os dados e tente novamente");
            }
        }