X-Git-Url: https://git.llucax.com/z.facultad/75.10/miklolife.git/blobdiff_plain/40b39c7a3f0ef8e0439d7cb610f48b4cdcf743b3..da1f09b5e9efa6b376117a02dbf59dfd967f51f9:/demo/src/Controlador/RegistrarVisitasController.cs?ds=sidebyside diff --git a/demo/src/Controlador/RegistrarVisitasController.cs b/demo/src/Controlador/RegistrarVisitasController.cs index 93f91f8..b3c5fca 100644 --- a/demo/src/Controlador/RegistrarVisitasController.cs +++ b/demo/src/Controlador/RegistrarVisitasController.cs @@ -26,6 +26,7 @@ public class RegistrarVisitasController : Controller { Solicitante s = new Solicitante (0, 0, null, null); s.Promotor = _promotor; + s.Pendiente = false; ObjectSet result = Db.get (s); return ObjectSetToArrayList (result); @@ -49,6 +50,33 @@ public class RegistrarVisitasController : Controller s = (Solicitante)result.next (); Db.delete (s); } + + public void Visitado (ETipoDocumento tipoDoc, int nroDoc) + { + /* Obtengo el solicitante */ + Solicitante s = new Solicitante (tipoDoc, nroDoc, null, null); + ObjectSet result = Db.get (s); + s = (Solicitante)result.next (); + s.Promotor = null; + Db.set (s); + } + + public int ObtenerCantidadFamiliares (ETipoDocumento tipoDoc, int nroDoc) + { + Solicitante s = new Solicitante (tipoDoc, nroDoc, null, null); + s.Pendiente = false; + s.Promotor = _promotor; + + ObjectSet result = Db.get (s); + s = (Solicitante)result.next (); + + if (s == null) { + Console.WriteLine ("No pude recuperar solicitante"); + return 0; + } + + return s.Familiares; + } } }