Exemplo n.º 1
0
        private void btLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaUsuario f = new frmConsultaUsuario(0);

            f.ShowDialog();
            if (f.codigo != 0)
            {
                DALConexao    cx     = new DALConexao(DadosDaConexao.StringDeConexao);
                BLLUsuario    bll    = new BLLUsuario(cx);
                ModeloUsuario modelo = bll.CarregaModeloUsuarioC(f.codigo);
                txtCodUser.Text = modelo.CodUser.ToString();
                txtLogin.Text   = modelo.NomeUser;
                txtSenha.Text   = modelo.SenhaUser;
                alteraBotoes(3);
            }
            else
            {
                this.LimpaTela();
                this.alteraBotoes(1);
            }
            f.Dispose();
        }