X-Git-Url: https://git.llucax.com/z.facultad/75.10/miklolife.git/blobdiff_plain/8f612d071bb562db0e58163fc2078040a93e23cf..9558b1720c211cc3e4987ab108149b52face4f7b:/demo/src/Controlador/RutasController.cs diff --git a/demo/src/Controlador/RutasController.cs b/demo/src/Controlador/RutasController.cs index 8216480..a2f2de6 100644 --- a/demo/src/Controlador/RutasController.cs +++ b/demo/src/Controlador/RutasController.cs @@ -7,6 +7,7 @@ using Dominio.Afiliados; using Dominio.Planes; using Dominio; using com.db4o; +using com.db4o.query; using System; using System.Collections; @@ -15,13 +16,16 @@ public class RutasController : Controller { 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); + query.descend("_pendiente").constrain(true); + + ObjectSet result = query.execute(); + Console.WriteLine (result); + ArrayList lst = ObjectSetToArrayList (result); + + return lst; } }