Ejemplo n.º 1
0
        private void CadastroEnviar_Click(object sender, EventArgs e)
        {
            Cadastro_DTO obj = new Cadastro_DTO();

            obj.Nome      = textBoxNome.Text;
            obj.Usuario   = textBoxUsuario.Text;
            obj.Email     = textBoxEmail.Text;
            obj.CPF       = textBoxCPF.Text;
            obj.Senha     = textBoxSenha.Text;
            obj.Confirmar = textBoxConfirmar.Text;
            Cadastro_BLL.ValidarCadastro(obj);
            Form1 telaInicial = new Form1();

            telaInicial.ShowDialog();
        }
Ejemplo n.º 2
0
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     try // botão
     {
         string cpf;
         cpf = maskedTextBox1.Text;
         Cadastro_BLL bll = new Cadastro_BLL();
         Cadastro_DTO obj = new Cadastro_DTO();
         obj              = bll.ValidarBusca(cpf);
         textBox1.Text    = obj.Nome;
         button10.Enabled = false;
         button8.Enabled  = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Mensagem", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string       retorno;
            Cadastro_DTO obj = new Cadastro_DTO();

            obj.Nome     = textBox1.Text;
            obj.RG       = textBox2.Text;
            obj.CPF      = maskedTextBox1.Text;
            obj.Endereco = textBox3.Text;
            obj.Numero   = textBox4.Text;
            obj.Bairro   = textBox5.Text;
            obj.Cidade   = textBox6.Text;
            obj.Banco    = textBox7.Text;
            obj.Agencia  = textBox8.Text;
            obj.Conta    = textBox9.Text;
            obj.Telefone = maskedTextBox2.Text;
            retorno      = Cadastro_BLL.ValidarCadastro(obj);
            MessageBox.Show(retorno, "ERRO", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }