BLL.Ingresos.Buscar C# (CSharp) Method

Buscar() public method

public Buscar ( int IdBuscado ) : bool
IdBuscado int
return bool
        public override bool Buscar(int IdBuscado)
        {
            bool retorno = false;
            DataTable dt = new DataTable();
            ConexionDb conexion = new ConexionDb();
            try
            { 
                dt = conexion.ObtenerDatos(String.Format("select * from Ingresos Where IngresoId = {0} ", IdBuscado));
                if (dt.Rows.Count > 0)
                {
                    this.Fecha = dt.Rows[0]["Fecha"].ToString();
                    this.CuentaId = (int)dt.Rows[0]["CuentaId"];
                    this.Monto = (double)dt.Rows[0]["Monto"];
                    this.MiembroId = (int)dt.Rows[0]["MiembroId"];
                    this.TipoIngresoId = (int)dt.Rows[0]["TipoIngresoId"];
                    this.Observacion = dt.Rows[0]["Observacion"].ToString();
                    retorno = true;
                }
            }
            catch (Exception)
            {

                retorno = false;
            }

            return retorno;
        }