public DataTable ListarColores() { DataTable dt = new DataTable(); Colores color = new Colores(); return(color.Listado("Descripcion, ColorId", "1=1", ""));; }
public bool Buscar(int IdBuscado) { DataTable dt = new DataTable(); dt = Colores.Listar("*", "IdColor = " + IdBuscado); if (dt.Rows.Count > 0) { DataRow[] dr; dr = dt.Select("IdColor = " + IdBuscado); this.IdColor = IdBuscado; this.Color = (string)dr[0]["Color"]; return(true); } else { return(false); } }