<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>
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);
+ }
}
}
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 ()
{