Пример #1
0
        private void bxtInserir_Click(object sender, EventArgs e)
        {
            Funcionario f = new Funcionario(Registro.NOVO_REGISTRO, txtNome.Text, txtCPF.Text, txtRG.Text, txtTelefone.Text, txtEmail.Text, txtSenha.Text, chkAdm.Checked);

            MessageBox.Show(bll.Inserir(f));
            dataGridView1.DataSource = bll.LerTodos();
            FormCleaner.Clear(this);
        }
Пример #2
0
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            Funcionario f = new Funcionario();

            f.Nome    = txtNome.Text;
            f.Usuario = txtUsuario.Text;
            f.Senha   = txtSenha.Text;
            if (txtSenha.Text == txtConfirmeSenha.Text)
            {
                string resposta = bll.Inserir(f);
                MessageBox.Show(resposta);
                FormHelpers.FormCleaner.ClearAllForm(this);
            }
            else
            {
                MessageBox.Show("As senhas devem ser iguais.");
            }
        }