Exemple #1
0
    protected void btnBuscaCep_Click(object sender, EventArgs e)
    {
        try
        {
            if (txtCdCepnor.Text != "")
            {
                HLP.WebServices.Cep      ws  = new HLP.WebServices.Cep();
                HLP.WebServices.Endereco end = ws.BuscaEndereco(txtCdCepnor.Text);

                if (end != null)
                {
                    txtDsEndnor.Text         = end.Logradouro;
                    txtNM_BAIRRONOR.Text     = end.Bairro;
                    cbxCdUfnor.SelectedValue = end.Uf.ToUpper();
                    CarregaCidades();
                    cbxCidades.SelectedValue = end.Cidade.ToUpper();
                    txtDsEndnor.Focus();
                }
            }
        }
        catch (Exception)
        {
        }
    }
Exemple #2
0
    protected void btnBuscaCep_Click(object sender, EventArgs e)
    {
        try
        {
            if (txtCdCepnor.Text != "")
            {
                HLP.WebServices.Cep ws = new HLP.WebServices.Cep();
                HLP.WebServices.Endereco end = ws.BuscaEndereco(txtCdCepnor.Text);

                if (end != null)
                {
                    txtDsEndnor.Text = end.Logradouro;
                    txtNM_BAIRRONOR.Text = end.Bairro;
                    cbxCdUfnor.SelectedValue = end.Uf.ToUpper();
                    CarregaCidades();
                    cbxCidades.SelectedValue = end.Cidade.ToUpper();
                    txtDsEndnor.Focus();
                }
            }
        }
        catch (Exception)
        {
        }
    }