public bool ConsultarByCalle() { DsCodigosPostales ds = new DsCodigosPostales(); SqlParameter pCalleDescrip = new SqlParameter("@CalleDescrip", this.CalleDescrip); SqlParameter pAlturaDesde = new SqlParameter("@AlturaDesde", this.AlturaDesde); SqlParameter pAlturaHasta = new SqlParameter("@AlturaHasta", this.AlturaHasta); SqlParameter pCodigoPostal = new SqlParameter("@CodigoPostal", this.CodigoPostalNro); Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "CodigosPostalesByCalle", pCalleDescrip, pAlturaDesde, pAlturaHasta, pCodigoPostal); if (ds.Datos.Rows.Count > 0) { DsCodigosPostales.DatosRow dr = (DsCodigosPostales.DatosRow)ds.Datos.Rows[0]; this.CalleDescrip = dr.CalleDescrip; this.CodigoPostalNro = dr.CodigoPostal; this.Baja = dr.Baja; this.LocalidadID = dr.LocalidadID; this.AlturaDesde = dr.AlturaDesde; this.AlturaHasta = dr.AlturaHasta; this.CodigoPostalID = dr.CodigoPostalID; } return(true); }
public bool Consultar() { DsCodigosPostales ds = this.GetCodigosPostalesDataSet(); if (ds == null) { return(false); } DsCodigosPostales.DatosRow dr = ds.Datos.FindByCodigoPostalID(this.CodigoPostalID); if (dr == null) { return(false); } this.CalleDescrip = dr.CalleDescrip; this.CodigoPostalNro = dr.CodigoPostal; this.Baja = dr.Baja; this.LocalidadID = dr.LocalidadID; this.AlturaDesde = dr.AlturaDesde; this.AlturaHasta = dr.AlturaHasta; return(true); }