using Glade;
using Dominio.Afiliados;
using Dominio.Planes;
+using com.db4o;
+using com.db4o.query;
public class App
{
#region Tests
- /// <summary>\r
- /// Decide si se corre la demo ó los tests automatizados\r
- /// </summary>
- private static bool testing = false;
-
private static void EjecutarTests()
{
Tests.TestsAutorizacion.Instancia.EjecutarTodos();
static public void Main (string[] args)
{
+ ObjectContainer db;
+ db = Db4o.openFile("os.yap");
+
+ Query query = db.query();
+ query.constrain(typeof(Persona));
+ ObjectSet result = query.execute();
+
+ Persona s;
+ Console.WriteLine (result);
+ Console.WriteLine ("--");
+ while ((s = (Persona)result.next ()) != null) {
+ Console.Write (" -- ");
+ Console.WriteLine ("{0} {1} {2} {3}", s.TipoDocumento, s.NroDocumento, s.Nombre, s.Apellido);
+ }
+ Console.WriteLine ("--");
+
+ db.close ();
if ( args.Length > 0) {
if (args[0].Equals ("--test")) {
- testing = true;
EjecutarTests();
return;
}
Application.Quit ();
}
- public void OnConsultarAfiliado (object o, EventArgs args)
+ public void OnIngresarSolicitud(object o, EventArgs args)
{
VIngresarSolicitud v = new VIngresarSolicitud ();
v.Run ();
v.Run ();
}
- public void OnRegistrarVisitas (object o, EventArgs args)
+ public void OnAgregarAfiliado (object o, EventArgs args)
{
- /*ABMGenerico g = new ABMGenerico (typeof(Plan));
- g.Run ();
- return;*/
- VRegistrarVisitas v = new VRegistrarVisitas ();
+ VAgregarAfiliado v = new VAgregarAfiliado ();
v.Run ();
}
- public void OnConsultarAfiliadoClose (object o, EventArgs args)
- {
- wConsultarAfiliado.Destroy ();
- }
- public void OnVerAfiliado (object o, EventArgs args)
+ public void OnMantenerPlanes (object o, EventArgs args)
{
+ VMantenerPlanes v = new VMantenerPlanes ();
+ v.Run ();
}
-
- public void OnBuscarAfiliado (object o, EventArgs args)
+
+ public void OnRegistrarVisitas (object o, EventArgs args)
{
- Entry codigo = (Entry)xmla.GetWidget ("s_codigo");
- TreeView lista = (TreeView)xmla.GetWidget ("lista");
- TreeStore store = (TreeStore)lista.Model;
- foreach (Afiliado a in lst) {
- if (a.Codigo == Int32.Parse (codigo.Text))
- store.AppendValues (String.Format("{0}", a.Codigo), a.Nombre);
- }
+ VRegistrarVisitas v = new VRegistrarVisitas ();
+ v.Run ();
}
}