Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Form_Relatorio_Usuario f = new Form_Relatorio_Usuario();

            f.ShowDialog();
            f.Dispose();
        }
Ejemplo n.º 2
0
        private void BotonPesquisar_Click(object sender, EventArgs e)
        {
            Form_Relatorio_Usuario relatorio = new Form_Relatorio_Usuario();

            relatorio.ShowDialog();
            if (relatorio.codigo != 0)
            {
                Validacao_Usuario valida  = new Validacao_Usuario(conexao);
                Modelo_Usuario    usuario = valida.CarregarUsuario(relatorio.codigo);
                txtCode.Text        = usuario.Codigo1.ToString();
                txtNome.Text        = usuario.Nome1.ToString();
                txtCPF.Text         = usuario.Cpf1;
                txtEmail.Text       = usuario.Email1;
                txtSexo.Text        = usuario.Sexo1;
                txtTelefone.Text    = usuario.Telefone1.ToString();
                txtData.Text        = usuario.DataNascimento1.ToShortDateString();
                txtComplemento.Text = usuario.Complemento1;
                txtCidade.Text      = usuario.Cidade1;
                txtEstado.Text      = usuario.Estado1;
                txtCEP.Text         = usuario.CEP1;
                txtBairro.Text      = usuario.Bairro1;
                txtRua.Text         = usuario.Rua1;

                txtSenha.Text = usuario.Password1.ToString();
                AlteraBotao(3);
            }
            else
            {
                LimpaCampos();
                txtNome.Focus();
                AlteraBotao(1);
            }
            relatorio.Dispose();
        }