using System;
using System.Collections;
-public class AfiliadoSolicitanteController : IDisposable
+public class AfiliadoSolicitanteController : Controller
{
private ArrayList _afiliados;
private ArrayList _solicitantes;
- private ObjectContainer db;
- public AfiliadoSolicitanteController ()
+ public AfiliadoSolicitanteController ():base()
{
- db = Db4o.openFile("os.yap");
}
- public void Dispose ()
- {
- db.close ();
- }
public ArrayList obtenerSolicitantesAfiliar ()
{
bool existe = false;
try {
- //do something with db4o
- ObjectSet result = db.get(c);
+ //do something with Db4o
+ ObjectSet result = Db.get(c);
if (result.next() != null)
existe = true;
}
{
try {
//do something with db4o
- db.set (s);
+ Db.set (s);
}
catch (Exception e) {
Console.WriteLine (e);
return true;
}
- private Solicitante GetSolicitante (ETipoDocumento tipoDoc, int nroDoc)
+ public Solicitante GetSolicitante (ETipoDocumento tipoDoc, int nroDoc)
{
Solicitante s = new Solicitante (tipoDoc, nroDoc, null, null);
return (Solicitante)lst[0];
}
- private ArrayList GetSolicitantes (Solicitante s)
+ public ArrayList GetSolicitantes (Solicitante s)
{
ArrayList lst = new ArrayList ();
try {
- ObjectSet result = db.get(s);
+ ObjectSet result = Db.get(s);
if (result == null)
return lst;
return lst;
}
- public ArrayList ObtenerSolicitantesPendientes ()
- {
- Solicitante s = new Solicitante (0, 0, null, null);
- Promotor p = null; // new Promotor (0, 0, null, null);
- s.Promotor = p;
- return GetSolicitantes (s);
- }
-
public void AsociarPromotor (ETipoDocumento tipoDoc, int nroDoc, int promotor)
{
try {