]> git.llucax.com Git - z.facultad/75.10/miklolife.git/commitdiff
* ElimiarSolicitante
authorRicardo Markiewicz <gazer.arg@gmail.com>
Thu, 16 Jun 2005 03:23:14 +0000 (03:23 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Thu, 16 Jun 2005 03:23:14 +0000 (03:23 +0000)
demo/glade/registrar_visitas.glade
demo/src/Controlador/RegistrarVisitasController.cs
demo/src/Vistas/VRegistrarVisitas.cs

index 4def3451bf4b83880d68ac240d1acf167bff2881..55f2f341b282406621adc17dabf9b5c70ec1004d 100644 (file)
                  <property name="use_underline">True</property>
                  <property name="relief">GTK_RELIEF_NORMAL</property>
                  <property name="focus_on_click">True</property>
                  <property name="use_underline">True</property>
                  <property name="relief">GTK_RELIEF_NORMAL</property>
                  <property name="focus_on_click">True</property>
+                 <signal name="clicked" handler="OnEliminarSolicitante" last_modification_time="Thu, 16 Jun 2005 03:17:41 GMT"/>
                </widget>
              </child>
            </widget>
                </widget>
              </child>
            </widget>
index 2e087dfe879a4a716ebec172fa7e8165eb961594..93f91f88b056b43e5d48befe4f452c9d7fea36d4 100644 (file)
@@ -40,6 +40,15 @@ public class RegistrarVisitasController : Controller
                s.Promotor = null;
                Db.set (s);
        }
                s.Promotor = null;
                Db.set (s);
        }
+
+       public void EliminarSolicitante (ETipoDocumento tipoDoc, int nroDoc)
+       {
+               /* Obtengo el solicitante */
+               Solicitante s = new Solicitante (tipoDoc, nroDoc, null, null);
+               ObjectSet result = Db.get (s);
+               s = (Solicitante)result.next ();
+               Db.delete (s);
+       }
 }
 
 }
 }
 
 }
index ab0088b4dc2aedc2ca63bc291adb6e6ff9fd2703..7df614fb04b50724e7d2fc3215985661ff808c0b 100644 (file)
@@ -61,6 +61,27 @@ public class VRegistrarVisitas
                c.EstablecerPendiente (tipoDoc, nroDoc);
                c.Dispose ();
        }
                c.EstablecerPendiente (tipoDoc, nroDoc);
                c.Dispose ();
        }
+       
+       public void OnEliminarSolicitante (object o, EventArgs args)
+       {
+               TreeSelection fromSel = visitas.Selection;
+               TreeIter iter;
+               TreeModel model;
+               ListStore store = (ListStore)visitas.Model;
+
+               if (fromSel.GetSelected (out model, out iter) == false) {
+                       /* Nada seleccionado */
+                       return;
+               }
+               ETipoDocumento tipoDoc;
+               int nroDoc;
+               tipoDoc = (ETipoDocumento)Enum.Parse (typeof (ETipoDocumento), (string)store.GetValue (iter, 0), true);
+               nroDoc = (int)store.GetValue (iter, 1);
+
+               RegistrarVisitasController c = new RegistrarVisitasController (null);
+               c.EliminarSolicitante (tipoDoc, nroDoc);
+               c.Dispose ();
+       }
 
        public void Run ()
        {
 
        public void Run ()
        {