public static AgenteBD getAgente()
 {
     if (Instancia == null) {
         Instancia = new AgenteBD();
     }
     return Instancia;
 }
 public void leerTod()
 {
     Usuario usr;
     ag = AgenteBD.getAgente();
     OleDbDataReader lector = ag.leer("SELECT * FROM Agenda;");
     while (lector.Read())
     {
         usr = new Usuario(lector.GetInt32(0), lector.GetString(1), lector.GetInt32(2));
         lista.Add(usr);
     }
     lector.Close();
 }
        public void leer(Usuario usr)
        {
            ag = AgenteBD.getAgente();
            int Id = usr.getId();
            OleDbDataReader lector = ag.leer("SELECT * FROM Agenda WHERE Id='" + Id.ToString() + "';");
            while (lector.Read())
            {
                usr.setNom(lector.GetString(1));
                usr.setNum(lector.GetInt32(2));

            }
            lector.Close();
        }