Example #1
0
        private void LstLogr_KeyDown(object sender, KeyEventArgs e)
        {
            if (LogradouroList.SelectedValue == null)
            {
                return;
            }
            Endereco_bll enderecoRepository = new Endereco_bll(_connection);

            if (e.KeyCode == Keys.Escape)
            {
                LogradouroList.Visible = false;


                LogradouroText.Focus();
                return;
            }
            if (e.KeyCode == Keys.Enter)
            {
                LogradouroText.Text    = LogradouroList.Text;
                LogradouroText.Tag     = LogradouroList.SelectedValue.ToString();
                LogradouroList.Visible = false;
                CarregaCep();
                NumeroList.Focus();
            }
        }
Example #2
0
 private void LstLogr_Leave(object sender, EventArgs e)
 {
     if (LogradouroList.SelectedValue == null)
     {
         LogradouroText.Text = "";
         LogradouroText.Tag  = "";
     }
     else
     {
         LogradouroText.Text = LogradouroList.Text;
         LogradouroText.Tag  = LogradouroList.SelectedValue.ToString();
     }
     LogradouroList.Visible = false;
     NumeroList.Focus();
     CarregaCep();
 }