示例#1
0
 private void txtCep_Leave(object sender, EventArgs e)
 {
     if (cep.ConsultaCep(txtCep.Text))
     {
         txtEndereco.Text = cep.Logradouro.ToString();
         txtBairro.Text   = cep.Inicial.ToString();
         txtCidade.Text   = cep.Loc_no.ToString();
         cmbEstado.Text   = cep.Ufe_sg.ToString();
     }
 }
示例#2
0
 private void txtCep_Leave(object sender, EventArgs e)
 {
     if (CEP.ConsultaCep(txtCep.Text))
     {
         txtEndereco.Text = CEP.Logradouro.ToString();
         txtBairro.Text   = CEP.Inicial.ToString();
         txtCidade.Text   = CEP.Loc_no.ToString();
         cmbEstado.Text   = CEP.Ufe_sg.ToString();
         txtEndereco.Focus();
         SendKeys.SendWait("{END}");
     }
 }
示例#3
0
 private void txtCep_Leave(object sender, EventArgs e)
 {
     if (xCep.ConsultaCep(txtCep.Text))
     {
         txtEndereco.Text = xCep.Logradouro.ToString();
         txtBairro.Text   = xCep.Inicial.ToString();
         txtCidade.Text   = xCep.Loc_no.ToString();
         cmbEstado.Text   = xCep.Ufe_sg.ToString();
     }
     else
     {
         MessageBox.Show("CEP Não encontrado !");
         txtEndereco.Focus();
     }
 }