BLL.Semestres.Buscar C# (CSharp) Method

Buscar() public method

public Buscar ( int Id ) : bool
Id int
return bool
        public bool Buscar(int Id) {
            bool mensaje = false;
            DataTable dt;
            dt = conexion.BuscarDb("select * from Semestres where IdSemestre = " + Id);
            if (dt.Rows.Count > 0) {
                mensaje = true;
                DataRow row = dt.Rows[0];
                this.IdSemestre = (int)row["IdSemestre"];
                this.Codigo = (string)row["Codigo"];
                this.FechaInicio = (DateTime)row["FechaInicio"];
                this.FechaFin = (DateTime)row["FechaFin"];
                this.FechaParcial1 = (DateTime)row["FechaParcial1"];
                this.FechaParcial2 = (DateTime)row["FechaParcial2"];
                this.FechaFinal = (DateTime)row["FechaFinal"];
                this.Activo = (bool)row["Activo"];
            }
            return mensaje;
        }