protected void btnGetDetalhes_Click(object sender, EventArgs e)
        {
            if (txtCodigo.Text == string.Empty)
            {
                lblMensagem.Text = "Informe um código";
                return;
            }

            Contato contato = ContatoDAL.GetContato(Int32.Parse(txtCodigo.Text));

            if (contato != null)
            {
                txtNome.Text         = contato.Nome;
                txtEmail.Text        = contato.Email;
                txtIdade.Text        = contato.Idade.ToString();
                btnAtualizar.Enabled = true;
            }
            else
            {
                lblMensagem.Text     = "Contato não encontrado";
                btnAtualizar.Enabled = false;
            }
        }
        protected void btnGetDetalhes_Click(object sender, EventArgs e)
        {
            if (txtCodigo.Text == string.Empty)
            {
                lblmsg.Text = "Código inválido";
                return;
            }

            Contato c = ContatoDAL.GetContato(Int32.Parse(txtCodigo.Text));

            if (c != null)
            {
                txtNome.Text        = c.Nome;
                txtEmail.Text       = c.Email;
                txtIdade.Text       = c.Idade.ToString();
                btnAtualiza.Enabled = true;
            }
            else
            {
                lblmsg.Text         = "Contato não encontrado";
                btnAtualiza.Enabled = false;
            }
        }