Пример #1
0
 public ActionResult PesquisaCEP(string cep)
 {
     cep = cep.Replace("-", "");
     CepRemoteService cepSvc = new CepRemoteService(cep);
     var obj = new
               return(null);
 }
Пример #2
0
        public ActionResult PesquisaCEP(string cep)
        {
            cep = cep.Replace("-", "");
            CepRemoteService cepSvc = new CepRemoteService(cep);
            var obj = new
            {
                Bairro = cepSvc.Bairro,
                Rua    = cepSvc.Logradouro,
                UF     = cepSvc.UF,
                Cidade = cepSvc.Cidade
            };

            return(Json(obj, JsonRequestBehavior.AllowGet));
        }