X-Git-Url: https://git.llucax.com/z.facultad/75.10/miklolife.git/blobdiff_plain/01ba80dab5bcd0b57e7ba017186532d4219468c3..40b39c7a3f0ef8e0439d7cb610f48b4cdcf743b3:/demo/src/Vistas/VRegistrarVisitas.cs?ds=sidebyside diff --git a/demo/src/Vistas/VRegistrarVisitas.cs b/demo/src/Vistas/VRegistrarVisitas.cs index ab0088b..7df614f 100644 --- a/demo/src/Vistas/VRegistrarVisitas.cs +++ b/demo/src/Vistas/VRegistrarVisitas.cs @@ -61,6 +61,27 @@ public class VRegistrarVisitas 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 () {