//----------------------------------------------------------- private Type Visit(Lst node, Table table) { if (node.Count() > 0) { Type lstType = Visit((dynamic)node[0], table); foreach (var n in node) { Type elmType = Visit((dynamic)n, table); if (elmType != lstType) { throw new SemanticError("All list elements should be of the same type: ", n.AnchorToken); } } if (lstType == Type.BOOLEAN) { return(Type.LIST_OF_BOOLEAN); } if (lstType == Type.INTEGER) { return(Type.LIST_OF_INTEGER); } if (lstType == Type.STRING) { return(Type.LIST_OF_STRING); } throw new TypeAccessException("Expecting one of the following node types: BOOLEAN, INTEGER, STRING"); } return(Type.LIST_OF_ANYTHING); }
internal List <Estado> OpeConsultar() { List <Estado> Lst; using (var estado = new cita_doctorContext()) { var estadoLst = (from est in estado.Estado .Where(c => (c.Activo == true)) select est); Lst = estadoLst.ToList(); if (Lst.Count() == 0) { return(new List <Estado>()); } } return(Lst); }
internal List <Cliente> OpeConsultar() { List <Cliente> Lst; using (var cliente = new cita_doctorContext()) { var clinicaLst = (from cli in cliente.Cliente .Where(c => (c.Estado == true)) select cli); Lst = clinicaLst.ToList(); if (Lst.Count() == 0) { return(new List <Cliente>()); } } return(Lst); }
internal List <Cliente> OpeConsultarClientes() { List <Cliente> Lst; using (var calendario = new cita_doctorContext()) { var calendarioLst = (from cal in calendario.Calendario .Include(cli => cli.IdClienteNavigation) select(cal.IdClienteNavigation)).Distinct(); Lst = calendarioLst.ToList(); if (Lst.Count() == 0) { return(new List <Cliente>()); } } return(Lst); }
internal List <Ciudad> OpeConsultar() { List <Ciudad> Lst; using (var ciudad = new cita_doctorContext()) { var ciudadLst = (from ciu in ciudad.Ciudad .Where(c => (c.Estado == true)) select ciu); Lst = ciudadLst.ToList(); if (Lst.Count() == 0) { return(new List <Ciudad>()); } } return(Lst); }
internal List <Calendario> OpeConsultarAgendadas() { List <Calendario> Lst; using (var calendario = new cita_doctorContext()) { var hoy = DateTime.Now; var calendarioLst = (from cal in calendario.Calendario .Where(cal => (cal.IdEstado == 1) && (cal.FinFechaHora >= hoy)) select cal); Lst = calendarioLst.ToList(); if (Lst.Count() == 0) { return(new List <Calendario>()); } } return(Lst); }
internal List <Clinica> OpeConsultar() { List <Clinica> Lst; using (var clinica = new cita_doctorContext()) { var clinicaLst = (from cli in clinica.Clinica .Include(ciu => ciu.IdCiudadNavigation) .Include(prov => prov.IdProvinciaNavigation) .Where(c => (c.Estado == true)) select cli); Lst = clinicaLst.ToList(); if (Lst.Count() == 0) { return(new List <Clinica>()); } } return(Lst); }
public Func <Unit, int> Count(Lst <A> fa) => _ => fa.Count();