return true;
}
+ private Solicitante GetSolicitante (ETipoDocumento tipoDoc, int nroDoc)
+ {
+ Solicitante s = new Solicitante (tipoDoc, nroDoc, null, null);
+
+ ArrayList lst = GetSolicitantes (s);
+
+ if (lst.Count == 0)
+ return null;
+
+ return (Solicitante)lst[0];
+ }
+
private ArrayList GetSolicitantes (Solicitante s)
{
ObjectContainer db=Db4o.openFile("os.yap");
public ArrayList ObtenerSolicitantesPendientes ()
{
Solicitante s = new Solicitante (0, 0, null, null);
-
- Console.WriteLine ("Obtengo los pendientes ...");
+ Promotor p = null; // new Promotor (0, 0, null, null);
+ s.Promotor = p;
return GetSolicitantes (s);
}
+
+ public void AsociarPromotor (ETipoDocumento tipoDoc, int nroDoc, int promotor)
+ {
+ ObjectContainer db=Db4o.openFile("os.yap");
+ try {
+ Solicitante s = new Solicitante (tipoDoc, nroDoc, null, null);
+ ObjectSet result = db.get(s);
+
+ s = (Solicitante)result.next ();
+ Promotor p = new Promotor (ETipoDocumento.DNI, 12345678, "123", "123");
+ s.Promotor = p;
+ db.set(s);
+ }
+ catch (Exception e) {
+ Console.WriteLine (e);
+ }
+ finally {
+ db.close();
+ }
+ }
+
}
}