queda mostrado como se usa + o -)
using com.db4o;
using System;
using com.db4o;
using System;
+using System.Collections;
public class Controller : IDisposable
{
public class Controller : IDisposable
{
+
+ protected ArrayList ObjectSetToArrayList (ObjectSet result)
+ {
+ ArrayList lst = new ArrayList ();
+ Object s;
+ if (result == null)
+ return lst;
+
+ while ((s = result.next ()) != null) {
+ lst.Add (s);
+ }
+ return lst;
+ }
using Dominio.Planes;
using Dominio;
using com.db4o;
using Dominio.Planes;
using Dominio;
using com.db4o;
using System;
using System.Collections;
using System;
using System.Collections;
{
public ArrayList ObtenerSolicitantesPendientes ()
{
{
public ArrayList ObtenerSolicitantesPendientes ()
{
- AfiliadoSolicitanteController c = new AfiliadoSolicitanteController ();
- Solicitante s = new Solicitante (0, 0, null, null);
- Promotor p = null; // new Promotor (0, 0, null, null);
- s.Promotor = p;
- ArrayList rtn = c.GetSolicitantes (s);
- c.Dispose ();
- return rtn;
+ Query query = Db.query();
+ query.constrain(typeof(Solicitante));
+ query.descend("_promotor").constrain(null);
+
+ ObjectSet result = query.execute();
+ Console.WriteLine (result);
+ ArrayList lst = ObjectSetToArrayList (result);
+
+ return lst;