]> git.llucax.com Git - z.facultad/75.10/miklolife.git/commitdiff
* Muchos cambios , ahi va andando, no me esta tomando las relaciones
authorRicardo Markiewicz <gazer.arg@gmail.com>
Mon, 4 Jul 2005 05:18:21 +0000 (05:18 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Mon, 4 Jul 2005 05:18:21 +0000 (05:18 +0000)
 con los titulares, en algun me estoy comiendo algo, mañana lo veo :P

demo/glade/registrar_visitas.glade
demo/src/Controlador/AfiliadoSolicitanteController.cs
demo/src/Controlador/RegistrarVisitasController.cs
demo/src/Main.cs
demo/src/Vistas/AgregarAfiliado.cs
demo/src/Vistas/AgregarFamiliar.cs
demo/src/Vistas/RegistrarVisitas.cs

index 8aabae845b882cc93bb3d1652a3c238499d236e9..1d2f03568d439e8124078f53b7598e41bd58aa7e 100644 (file)
@@ -18,6 +18,7 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
   <property name="has_separator">True</property>
 
   <child internal-child="vbox">
   <property name="has_separator">True</property>
 
   <child internal-child="vbox">
@@ -76,6 +77,9 @@
                  <property name="rules_hint">False</property>
                  <property name="reorderable">False</property>
                  <property name="enable_search">True</property>
                  <property name="rules_hint">False</property>
                  <property name="reorderable">False</property>
                  <property name="enable_search">True</property>
+                 <property name="fixed_height_mode">False</property>
+                 <property name="hover_selection">False</property>
+                 <property name="hover_expand">False</property>
                </widget>
              </child>
            </widget>
                </widget>
              </child>
            </widget>
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
   <property name="has_separator">True</property>
   <property name="has_separator">True</property>
+  <signal name="response" handler="OnDialogResponse" last_modification_time="Mon, 04 Jul 2005 04:52:47 GMT"/>
 
   <child internal-child="vbox">
     <widget class="GtkVBox" id="dialog-vbox1">
 
   <child internal-child="vbox">
     <widget class="GtkVBox" id="dialog-vbox1">
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
 LC
 LE
 CI</property>
 LC
 LE
 CI</property>
+                             <property name="add_tearoffs">False</property>
+                             <property name="focus_on_click">True</property>
                            </widget>
                            <packing>
                              <property name="padding">0</property>
                            </widget>
                            <packing>
                              <property name="padding">0</property>
@@ -612,6 +644,10 @@ CI</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
                </widget>
                <packing>
                  <property name="type">label_item</property>
                </widget>
                <packing>
                  <property name="type">label_item</property>
@@ -666,6 +702,10 @@ CI</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
@@ -690,6 +730,10 @@ CI</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
@@ -714,6 +758,10 @@ CI</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">2</property>
                        </widget>
                        <packing>
                          <property name="left_attach">2</property>
@@ -738,6 +786,10 @@ CI</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">4</property>
                        </widget>
                        <packing>
                          <property name="left_attach">4</property>
@@ -762,6 +814,10 @@ CI</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
@@ -778,6 +834,8 @@ CI</property>
                          <property name="visible">True</property>
                          <property name="items" translatable="yes">Rio Negro
 Neuquen</property>
                          <property name="visible">True</property>
                          <property name="items" translatable="yes">Rio Negro
 Neuquen</property>
+                         <property name="add_tearoffs">False</property>
+                         <property name="focus_on_click">True</property>
                        </widget>
                        <packing>
                          <property name="left_attach">1</property>
                        </widget>
                        <packing>
                          <property name="left_attach">1</property>
@@ -801,6 +859,10 @@ Neuquen</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">4</property>
                        </widget>
                        <packing>
                          <property name="left_attach">4</property>
@@ -825,6 +887,10 @@ Neuquen</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
                        </widget>
                        <packing>
                          <property name="left_attach">0</property>
@@ -979,6 +1045,10 @@ Neuquen</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
                </widget>
                <packing>
                  <property name="type">label_item</property>
                </widget>
                <packing>
                  <property name="type">label_item</property>
index b243964c7c831905e7e689842d714b65efa0d2bb..00a2bcbe8670d9df4ca93114339e30db10c8c222 100644 (file)
@@ -42,9 +42,7 @@ public class AfiliadoSolicitanteController : Controller
                query.descend("_pendiente").constrain(false);
                query.descend("_titular").constrain(s);
 
                query.descend("_pendiente").constrain(false);
                query.descend("_titular").constrain(s);
 
-               Console.WriteLine (query);
                ObjectSet result = query.execute();
                ObjectSet result = query.execute();
-               Console.WriteLine (result);
                ArrayList lst = ObjectSetToArrayList (result);
 
                return lst;
                ArrayList lst = ObjectSetToArrayList (result);
 
                return lst;
index 5949704f26757fcdb6240bd5de09435425876a02..5556d89aa2c0b58934f931af41990ef591049c6a 100644 (file)
@@ -86,7 +86,7 @@ public class RegistrarVisitasController : Controller
 
                return s.Familiares;
        }
 
                return s.Familiares;
        }
-
+       
        public void CargarFamiliar (
                ETipoDocumento tipoTitular, int nroTitular, ETipoDocumento tipoDoc, int nroDoc, string nombre, string apellido, string email,
                DateTime fechaNac, string calle, int numero, int piso, string dpto, string telefono,
        public void CargarFamiliar (
                ETipoDocumento tipoTitular, int nroTitular, ETipoDocumento tipoDoc, int nroDoc, string nombre, string apellido, string email,
                DateTime fechaNac, string calle, int numero, int piso, string dpto, string telefono,
@@ -116,6 +116,7 @@ public class RegistrarVisitasController : Controller
 
                s.Direccion = d;
 
 
                s.Direccion = d;
 
+               Console.WriteLine ("Se guarda {0} {1}", s.TipoDocumento, s.NroDocumento);
                c.SaveSolicitante (s);
                c.Dispose ();
        }
                c.SaveSolicitante (s);
                c.Dispose ();
        }
index 3f1e69de1046275b082489bfd2e0eac919f8bc48..6c6b44ab526d42d52e919f134078c87ce20b4ee1 100644 (file)
@@ -5,6 +5,8 @@ using Gtk;
 using Glade;
 using Dominio.Afiliados;
 using Dominio.Planes;
 using Glade;
 using Dominio.Afiliados;
 using Dominio.Planes;
+using com.db4o;
+using com.db4o.query;
 
 public class App
 {
 
 public class App
 {
@@ -29,6 +31,23 @@ public class App
 
        static public void Main (string[] args)
        {
 
        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")) {
                                EjecutarTests();
                if ( args.Length > 0) {
                        if (args[0].Equals ("--test")) {
                                EjecutarTests();
index bec44504ee49a2f99d7e2f1eea5858413e42d2a1..717449a5a889301670b4dc9aa7ee13c5d1023bc5 100644 (file)
@@ -50,7 +50,6 @@ public class VAgregarAfiliado
        {
                TreeStore store = (TreeStore)lista.Model;
                ArrayList familiares = c.ObtenerFamiliaresAfiliar (spadre);
        {
                TreeStore store = (TreeStore)lista.Model;
                ArrayList familiares = c.ObtenerFamiliaresAfiliar (spadre);
-               Console.WriteLine ("{0} {1} -> {2}", spadre.TipoDocumento, spadre.NroDocumento, familiares.Count);
 
                foreach (Solicitante s in familiares) {
                        TreeIter iter = store.AppendValues (padre, s.TipoDocumento.ToString (), s.NroDocumento, s.Nombre, s.Apellido);
 
                foreach (Solicitante s in familiares) {
                        TreeIter iter = store.AppendValues (padre, s.TipoDocumento.ToString (), s.NroDocumento, s.Nombre, s.Apellido);
index 38dbc1229f583025b40518aab7eea85f02121056..c2d0b172900e1915b68313008819e81ebee3b7f2 100644 (file)
@@ -36,9 +36,11 @@ public class VAgregarFamiliar
 
        ETipoDocumento tipoTitular;
        int nroTitular;
 
        ETipoDocumento tipoTitular;
        int nroTitular;
+       RegistrarVisitasController c;
 
 
-       public VAgregarFamiliar(int n, int t, ETipoDocumento td_titular, int doc_titular)
+       public VAgregarFamiliar(int n, int t, ETipoDocumento td_titular, int doc_titular, RegistrarVisitasController c)
        {
        {
+               this.c = c;
                xml = new Glade.XML (null, "registrar_visitas.glade", "agregar_familiar", null);
                xml.Autoconnect (this);
                actual = n;
                xml = new Glade.XML (null, "registrar_visitas.glade", "agregar_familiar", null);
                xml.Autoconnect (this);
                actual = n;
@@ -50,8 +52,8 @@ public class VAgregarFamiliar
        public void OnDialogResponse (object o, ResponseArgs args)
        {
                TreeIter iter;
        public void OnDialogResponse (object o, ResponseArgs args)
        {
                TreeIter iter;
-               if (args.ResponseId == ResponseType.Cancel)
-                       return; 
+               /*if (args.ResponseId == ResponseType.Cancel)
+                       return; */
 
                ETipoDocumento _tipoDoc;
                int _nroDoc;
 
                ETipoDocumento _tipoDoc;
                int _nroDoc;
@@ -67,9 +69,6 @@ public class VAgregarFamiliar
                EProvincia _provincia;
                string _telefono;
 
                EProvincia _provincia;
                string _telefono;
 
-               /* Acept presionado, guardo */
-               RegistrarVisitasController c = new RegistrarVisitasController (null);
-
                tipoDoc.GetActiveIter (out iter);
                _tipoDoc = (ETipoDocumento)Enum.Parse (typeof (ETipoDocumento), (string)tipoDoc.Model.GetValue (iter, 0), true);
                _nroDoc = Int32.Parse (nroDoc.Text);
                tipoDoc.GetActiveIter (out iter);
                _tipoDoc = (ETipoDocumento)Enum.Parse (typeof (ETipoDocumento), (string)tipoDoc.Model.GetValue (iter, 0), true);
                _nroDoc = Int32.Parse (nroDoc.Text);
@@ -95,8 +94,6 @@ public class VAgregarFamiliar
                        tipoTitular, nroTitular, _tipoDoc, _nroDoc, _nombre, _apellido, _email,
                        _fechaNac, _calle, _numero, _piso,  _dpto, _telefono, 
                        _sexo);
                        tipoTitular, nroTitular, _tipoDoc, _nroDoc, _nombre, _apellido, _email,
                        _fechaNac, _calle, _numero, _piso,  _dpto, _telefono, 
                        _sexo);
-
-               c.Dispose ();
        }
 
        public void OnSeleccionarFechaClicked (object o, EventArgs args)
        }
 
        public void OnSeleccionarFechaClicked (object o, EventArgs args)
index 9390248c5e86c43401020cfb8e53e8d7f23df119..590055ff36e3e465b4fc15dc555462532d6939c4 100644 (file)
@@ -126,7 +126,7 @@ public class VRegistrarVisitas
 
                if (familiares > 0) {
                        for (int i=0; i<familiares; i++) {
 
                if (familiares > 0) {
                        for (int i=0; i<familiares; i++) {
-                               AgregarFamiliar (i+1, familiares, tipoDoc, nroDoc);
+                               AgregarFamiliar (i+1, familiares, tipoDoc, nroDoc, c);
                        }
                }
 
                        }
                }
 
@@ -136,9 +136,9 @@ public class VRegistrarVisitas
                store.Remove (ref iter);
        }
 
                store.Remove (ref iter);
        }
 
-       private void AgregarFamiliar (int n, int total, ETipoDocumento tipo, int nro)
+       private void AgregarFamiliar (int n, int total, ETipoDocumento tipo, int nro, RegistrarVisitasController c)
        {
        {
-               VAgregarFamiliar w = new VAgregarFamiliar (n, total, tipo, nro);
+               VAgregarFamiliar w = new VAgregarFamiliar (n, total, tipo, nro, c);
                w.Run ();
        }
 
                w.Run ();
        }