X-Git-Url: https://git.llucax.com/z.facultad/75.10/miklolife.git/blobdiff_plain/40b39c7a3f0ef8e0439d7cb610f48b4cdcf743b3..89d41bbc02ddd71e2ed2a5646d726e2be4207a81:/demo/src/Controlador/RegistrarVisitasController.cs?ds=inline 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; + } } }