X-Git-Url: https://git.llucax.com/z.facultad/75.10/miklolife.git/blobdiff_plain/01ba80dab5bcd0b57e7ba017186532d4219468c3..f66e3a677316d8e7c06317a2beab0bcf4d8f3237:/demo/src/Controlador/RegistrarVisitasController.cs?ds=inline diff --git a/demo/src/Controlador/RegistrarVisitasController.cs b/demo/src/Controlador/RegistrarVisitasController.cs index 2e087df..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); @@ -40,6 +41,42 @@ public class RegistrarVisitasController : Controller 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); + } + + 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; + } } }