/// <summary> /// Função que Transmite o Código informado, para pesquisa /// </summary> /// <param name="CodCidade"></param> /// <returns></returns> public List <MOD_cidade> buscarCod(string CodCidade) { try { objDAL = new DAL_cidade(); objDtb = objDAL.buscarCod(CodCidade); if (objDtb != null) { listaCidade = this.criarLista(objDtb); } return(listaCidade); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }
/// <summary> /// Função que Transmite o Cep informada, para pesquisa /// </summary> /// <param name="Cep"></param> /// <returns></returns> public List <MOD_cidade> buscarCep(string Cep) { try { objDAL = new DAL_cidade(); Cep = Cep.Replace(" ", "").Replace("-", "").Replace(".", "").Replace(",", ""); objDtb = objDAL.buscarCep(Cep); if (objDtb != null) { listaCidade = this.criarLista(objDtb); } return(listaCidade); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }