]> git.llucax.com Git - z.facultad/75.10/miklolife.git/commitdiff
* Agrego ObtenerSolicitantesPendiente (Pasar al controller correspondiente despues)
authorRicardo Markiewicz <gazer.arg@gmail.com>
Tue, 14 Jun 2005 05:29:05 +0000 (05:29 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Tue, 14 Jun 2005 05:29:05 +0000 (05:29 +0000)
 * Agrego GenerarHojaDeRuta (vista) que recupera de la DB los solicitante y permite armar
  la hoja de ruta (no la guarda, pues no se como)
 * Detalles

carpeta/disenio_grafico/glade/emitir_hoja_de_ruta.glade
carpeta/disenio_grafico/glade/main.glade
carpeta/disenio_grafico/src/Controlador/AfiliadoSolicitanteController.cs
carpeta/disenio_grafico/src/Dominio/Persona.cs
carpeta/disenio_grafico/src/Main.cs
carpeta/disenio_grafico/src/Makefile

index 8b8eb98a1805450b794de1d949f5010f896c8a28..b45d64f6e6cf28992e72257656e251550646886e 100644 (file)
@@ -17,6 +17,7 @@
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="has_separator">True</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="has_separator">True</property>
+  <signal name="response" handler="OnDialogResponse" last_modification_time="Tue, 14 Jun 2005 04:13:22 GMT"/>
 
   <child internal-child="vbox">
     <widget class="GtkVBox" id="dialog-vbox1">
 
   <child internal-child="vbox">
     <widget class="GtkVBox" id="dialog-vbox1">
@@ -91,6 +92,9 @@
                  <child>
                    <widget class="GtkComboBox" id="promotores">
                      <property name="visible">True</property>
                  <child>
                    <widget class="GtkComboBox" id="promotores">
                      <property name="visible">True</property>
+                     <property name="items" translatable="yes">
+</property>
+                     <signal name="changed" handler="OnPromotorSelected" last_modification_time="Tue, 14 Jun 2005 04:29:59 GMT"/>
                    </widget>
                  </child>
                </widget>
                    </widget>
                  </child>
                </widget>
                  <property name="spacing">5</property>
 
                  <child>
                  <property name="spacing">5</property>
 
                  <child>
-                   <widget class="GtkButton" id="button2">
+                   <widget class="GtkButton" id="agregar">
                      <property name="visible">True</property>
                      <property name="can_default">True</property>
                      <property name="can_focus">True</property>
                      <property name="visible">True</property>
                      <property name="can_default">True</property>
                      <property name="can_focus">True</property>
                      <property name="use_stock">True</property>
                      <property name="relief">GTK_RELIEF_NORMAL</property>
                      <property name="focus_on_click">True</property>
                      <property name="use_stock">True</property>
                      <property name="relief">GTK_RELIEF_NORMAL</property>
                      <property name="focus_on_click">True</property>
+                     <signal name="clicked" handler="OnAgregarClicked" last_modification_time="Tue, 14 Jun 2005 04:15:22 GMT"/>
                    </widget>
                  </child>
 
                  <child>
                    </widget>
                  </child>
 
                  <child>
-                   <widget class="GtkButton" id="button3">
+                   <widget class="GtkButton" id="borrar">
                      <property name="visible">True</property>
                      <property name="can_default">True</property>
                      <property name="can_focus">True</property>
                      <property name="visible">True</property>
                      <property name="can_default">True</property>
                      <property name="can_focus">True</property>
                      <property name="use_stock">True</property>
                      <property name="relief">GTK_RELIEF_NORMAL</property>
                      <property name="focus_on_click">True</property>
                      <property name="use_stock">True</property>
                      <property name="relief">GTK_RELIEF_NORMAL</property>
                      <property name="focus_on_click">True</property>
+                     <signal name="clicked" handler="OnBorrarClicked" last_modification_time="Tue, 14 Jun 2005 04:16:01 GMT"/>
                    </widget>
                  </child>
                </widget>
                    </widget>
                  </child>
                </widget>
                          <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
                          <child>
                          <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
                          <child>
-                           <widget class="GtkTreeView" id="horaderuta">
+                           <widget class="GtkTreeView" id="hojaderuta">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="headers_visible">True</property>
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="headers_visible">True</property>
index 9128e963f6ce41c79ee96af89fcaaf817d5dcb5b..1f1776106134774285ddb7b1483d34a1cd1b6d1f 100644 (file)
@@ -81,8 +81,8 @@
          <child>
            <widget class="GtkToolButton" id="ConsultarAfiliado">
              <property name="visible">True</property>
          <child>
            <widget class="GtkToolButton" id="ConsultarAfiliado">
              <property name="visible">True</property>
-             <property name="label" translatable="yes">Consultar 
-Afiliado</property>
+             <property name="label" translatable="yes">Ingresar
+Solicitud</property>
              <property name="use_underline">True</property>
              <property name="stock_id">gtk-open</property>
              <property name="visible_horizontal">True</property>
              <property name="use_underline">True</property>
              <property name="stock_id">gtk-open</property>
              <property name="visible_horizontal">True</property>
@@ -96,6 +96,24 @@ Afiliado</property>
            </packing>
          </child>
 
            </packing>
          </child>
 
+         <child>
+           <widget class="GtkToolButton" id="toolbutton4">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Emitir Hoja
+  de Ruta</property>
+             <property name="use_underline">True</property>
+             <property name="stock_id">gtk-open</property>
+             <property name="visible_horizontal">True</property>
+             <property name="visible_vertical">True</property>
+             <property name="is_important">False</property>
+             <signal name="clicked" handler="OnEmitirHojaDeRuta" last_modification_time="Tue, 14 Jun 2005 04:18:14 GMT"/>
+           </widget>
+           <packing>
+             <property name="expand">False</property>
+             <property name="homogeneous">True</property>
+           </packing>
+         </child>
+
          <child>
            <widget class="GtkToolButton" id="toolbutton3">
              <property name="visible">True</property>
          <child>
            <widget class="GtkToolButton" id="toolbutton3">
              <property name="visible">True</property>
index c940f899acf820403bd9ae5c3dc795487ef64aa8..bceaec5401f99376a613e8e01b0faec9cadf0dea 100644 (file)
@@ -37,7 +37,7 @@ public class AfiliadoSolicitanteController
                return false;
        }
 
                return false;
        }
 
-       public ArrayList obtenerFamiliares (ETipoDocumento tipoDoc, int nroDoc)
+       public ArrayList ObtenerFamiliares (ETipoDocumento tipoDoc, int nroDoc)
        {
                ArrayList salida = new ArrayList ();
                /* Afiliado a = GETAFILIADO(tipoDoc, nroDoc
        {
                ArrayList salida = new ArrayList ();
                /* Afiliado a = GETAFILIADO(tipoDoc, nroDoc
@@ -73,7 +73,23 @@ public class AfiliadoSolicitanteController
 
        public bool ExisteSolicitante (ETipoDocumento tipoDoc, int nroDoc)
        {
 
        public bool ExisteSolicitante (ETipoDocumento tipoDoc, int nroDoc)
        {
-               return false;
+               Solicitante c = new Solicitante (tipoDoc, nroDoc, null, null);
+               
+               ObjectContainer db=Db4o.openFile("os.yap");
+               bool existe = false;
+               try {
+                       //do something with db4o
+                       ObjectSet result = db.get(c);
+           if (result.next() != null)
+                               existe = true;
+               }
+               catch (Exception e) {
+                       Console.WriteLine (e);
+               }
+               finally {
+                       db.close();
+               }
+               return existe;
        }
 
        public void AgregarSolicitante (
        }
 
        public void AgregarSolicitante (
@@ -121,8 +137,6 @@ public class AfiliadoSolicitanteController
                try {
                        //do something with db4o
                        db.set (s);
                try {
                        //do something with db4o
                        db.set (s);
-                       ObjectSet result = db.get(s);
-           Console.WriteLine (result.next());
                }
                catch (Exception e) {
                        Console.WriteLine (e);
                }
                catch (Exception e) {
                        Console.WriteLine (e);
@@ -133,12 +147,37 @@ public class AfiliadoSolicitanteController
                return true;
        }
 
                return true;
        }
 
-       private Afiliado Restore (int codigo)
+       private ArrayList GetSolicitantes (Solicitante s)
        {
        {
-               /* restora de la db */
-               return null;
+               ObjectContainer db=Db4o.openFile("os.yap");
+               ArrayList lst = new ArrayList ();
+               try {
+                       ObjectSet result = db.get(s);
+                       if (result == null)
+                               return lst;
+       
+                       while ((s = (Solicitante)result.next ()) != null)       {
+                               lst.Add (s);
+                       }
+               }
+               catch (Exception e) {
+                       Console.WriteLine ("----- GetSolicitantes ------");
+                       Console.WriteLine (e);
+                       Console.WriteLine ("----------------------------");
+               }
+               finally {
+                       db.close();
+               }
+               return lst;
        }
        
        }
        
+       public ArrayList ObtenerSolicitantesPendientes ()
+       {
+               Solicitante s = new Solicitante (0, 0, null, null);
+
+               Console.WriteLine ("Obtengo los pendientes ...");
+               return GetSolicitantes (s);
+       }
 }
 
 }
 }
 
 }
index b251e17a1510e86fd3c43f39a7ef03b87fe0f5fd..41943dca430b06cb4bab59d71740c5599640a6c5 100644 (file)
@@ -5,6 +5,7 @@ using System;
 
 public enum ETipoDocumento 
 {
 
 public enum ETipoDocumento 
 {
+       NONE=0,
        DNI,
        LC,
        LE,
        DNI,
        LC,
        LE,
@@ -20,10 +21,10 @@ public enum ESexo
 public class Persona
 {
        /* Private Members */
 public class Persona
 {
        /* Private Members */
-       private ETipoDocumento _tipoDocumento;
-       private int _nroDocumento;
-       private string _nombre;
-       private string _apellido;
+       private ETipoDocumento _tipoDocumento = ETipoDocumento.NONE;
+       private int _nroDocumento = 0;
+       private string _nombre = null;
+       private string _apellido = null;
        private string _eMail;
        private DateTime _fechaNacimiento;
        private ESexo _sexo;
        private string _eMail;
        private DateTime _fechaNacimiento;
        private ESexo _sexo;
index 4896a533b341e513b8f22661228dc27d5dcd2d11..b7400b9b1320c6e588e236ba13134ad69a88b028 100644 (file)
@@ -47,6 +47,12 @@ public class App
                v.Run ();
        }
 
                v.Run ();
        }
 
+       public void OnEmitirHojaDeRuta (object o, EventArgs args)
+       {
+               VEmitirHojaDeRuta v = new VEmitirHojaDeRuta ();
+               v.Run ();
+       }
+
        public void OnConsultarAfiliadoClose (object o, EventArgs args)
        {
                wConsultarAfiliado.Destroy ();
        public void OnConsultarAfiliadoClose (object o, EventArgs args)
        {
                wConsultarAfiliado.Destroy ();
index 889720f2ed9b8f48fa8af391a25059a0421aeb78..b5eabde7a9602a761cdfc8f872fe8c7f31e8c51a 100644 (file)
@@ -11,7 +11,8 @@ LIBS=-pkg:glade-sharp-2.0 -pkg:gtk-sharp-2.0 -r:./bin/db4o.dll
 GLADE= \
        -res:../glade/main.glade \
        -res:../glade/consultar_afiliado.glade \
 GLADE= \
        -res:../glade/main.glade \
        -res:../glade/consultar_afiliado.glade \
-       -res:../glade/ingresar_solicitud.glade
+       -res:../glade/ingresar_solicitud.glade \
+       -res:../glade/emitir_hoja_de_ruta.glade
 
 
 all:
 
 
 all: